Skip to content

Commit

Permalink
MDL-56253 grade: have coursemodule name pass filters.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Nov 20, 2017
1 parent 2a62623 commit 0cca93b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grade/grading/lib.php
Expand Up @@ -185,8 +185,8 @@ public function get_component_title() {
} else if ($this->get_context()->contextlevel >= CONTEXT_COURSE) {
list($context, $course, $cm) = get_context_info_array($this->get_context()->id);

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

0 comments on commit 0cca93b

Please sign in to comment.