Project: moodle
Issue MDL-42339: Remove double formatting set_title/set_heading over codebase
Both $PAGE->set_title() and $PAGE->set_heading() already process the contents passed with format_string(). So any call of this type: * $PAGE->set_title(format_string(… (there are 42 of this, at least) * $PAGE->set_heading(format_string(… (there are 25 of this, at least) Context in format_string() calls is only needed if it does not match current $PAGE->context OR if it has not been set. And any of these operations set it: * require_login() calls passing the 3rd, $cm parameter. * $PAGE->set_cm() calls. * $PAGE->set_context() explicit calls. This is about to search and destroy all those incorrect uses, looking to each carefully, ensuring that context is always set.
Story points: 13