diff --git a/grade/report/overview/lib.php b/grade/report/overview/lib.php index c86cf3755f4..a68b6e9a1e2 100644 --- a/grade/report/overview/lib.php +++ b/grade/report/overview/lib.php @@ -158,7 +158,7 @@ class grade_report_overview extends grade_report { continue; } - $courseshortname = format_string($course->shortname, true, array('context' => $coursecontext)); + $courseshortname = format_string(get_course_display_name_for_list($course), true, array('context' => $coursecontext)); $courselink = html_writer::link(new moodle_url('/grade/report/user/index.php', array('id' => $course->id, 'userid' => $this->user->id)), $courseshortname); $canviewhidden = has_capability('moodle/grade:viewhidden', $coursecontext); diff --git a/grade/tests/behat/grade_view.feature b/grade/tests/behat/grade_view.feature index 9ca28d41b02..76042aea21a 100644 --- a/grade/tests/behat/grade_view.feature +++ b/grade/tests/behat/grade_view.feature @@ -77,8 +77,8 @@ Feature: We can enter in grades and view reports from the gradebook | Grade item | Grade | Range | Percentage | | Course total | 90.00 | 0–100 | 90.00 % | And I set the field "Grade report" to "Overview report" - And "C1" row "Grade" column of "overview-grade" table should contain "170.00" - And "C1" row "Grade" column of "overview-grade" table should not contain "90.00" + And "Course 1" row "Grade" column of "overview-grade" table should contain "170.00" + And "Course 1" row "Grade" column of "overview-grade" table should not contain "90.00" @javascript Scenario: We can add a weighting to a grade item and it is displayed properly in the user report