We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d692104 + a96ef27 commit fe709d6Copy full SHA for fe709d6
grade/grading/lib.php
@@ -185,8 +185,8 @@ public function get_component_title() {
185
} else if ($this->get_context()->contextlevel >= CONTEXT_COURSE) {
186
list($context, $course, $cm) = get_context_info_array($this->get_context()->id);
187
188
- if (strval($cm->name) !== '') {
189
- $title = $cm->name;
+ if ($cm && strval($cm->name) !== '') {
+ $title = format_string($cm->name, true, array('context' => $context));
190
} else {
191
debugging('Gradable areas are currently supported at the course module level only', DEBUG_DEVELOPER);
192
$title = $this->get_component();
0 commit comments