-
Improvement
-
Resolution: Fixed
-
Minor
-
2.6, 3.5
-
MOODLE_26_STABLE, MOODLE_35_STABLE
-
MOODLE_35_STABLE
-
MDL-43362-master -
- Visit /course/view.php on your site (no params)
- Confirm The error message should be inside a Bootstrap danger box.
- Visit /course/view.php on your site (no params)
Currently fatal errors look like this:
<div class="box errorbox"><p class="errormessage">A required parameter (id) was missing</p><p class="errorcode"><a href="http://docs.moodle.org/26/en/error/moodle/missingparam">More information about this error</a></p></div>
we should add bootstrap classes so they render like Bootstrap Danger/Error Alerts:
<div class="box errorbox alert alert-error"><p class="errormessage">A required parameter (id) was missing</p><p class="errorcode"><a href="http://docs.moodle.org/26/en/error/moodle/missingparam">More information about this error</a></p></div>
or for Bootstrap v3 (error -> danger, add alert class on link)
<div class="box errorbox alert alert-danger"><p class="errormessage">A required parameter (id) was missing</p><p class="errorcode"><a class="alert-link" href="http://docs.moodle.org/24/en/error/moodle/missingparam">More information about this error</a></p></div>
This all currently happens here:
https://github.com/moodle/moodle/blob/master/lib/outputrenderers.php#L2577-L2584
In order to make it easier to make this change, and allow for future upgrades, the bit that outputs the error should be extracted into it's own renderer first