Skip to content

Commit fe709d6

Browse files
author
David Monllao
committed
Merge branch 'MDL-56253-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE
2 parents d692104 + a96ef27 commit fe709d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

grade/grading/lib.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ public function get_component_title() {
185185
} else if ($this->get_context()->contextlevel >= CONTEXT_COURSE) {
186186
list($context, $course, $cm) = get_context_info_array($this->get_context()->id);
187187

188-
if (strval($cm->name) !== '') {
189-
$title = $cm->name;
188+
if ($cm && strval($cm->name) !== '') {
189+
$title = format_string($cm->name, true, array('context' => $context));
190190
} else {
191191
debugging('Gradable areas are currently supported at the course module level only', DEBUG_DEVELOPER);
192192
$title = $this->get_component();

0 commit comments

Comments
 (0)