Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.9.1
-
MOODLE_39_STABLE
-
MOODLE_310_STABLE
-
Description
Some related issues MDL-42339 (fixed), MDL-29240 (closed as inactive)
When calling $PAGE->set_heading() it calls the format_string() unconditionally. If $CFG->formatstringstriptags is set to on (which is default), all tags are removed from the page heading.
We need to be able to add a "pill" or "edit" icon to the heading and it is not possible because of this. We also can't change the default behavior (applying format_string()) because a lot of place expect it to be present. So how about adding a parameter $applyformatting = true
With this change we can call:
$heading = format_string(...);
|
$pill = ' <span class="badge badge-secondary">New</span>';
|
$PAGE->set_heading($heading . $pill, false);
|