MDL-75665 gradereport_overview: Format strings in grade report overview

This commit is contained in:
Anastasios Bithas
2022-09-07 12:36:59 +03:00
parent b2e9ca957a
commit 098cf7b38d
+3 -1
View File
@@ -352,8 +352,10 @@ class grade_report_overview extends grade_report {
$table->head = array(get_string('coursename', 'grades'));
$table->data = null;
foreach ($this->teachercourses as $courseid => $course) {
$coursecontext = context_course::instance($course->id);
$coursenamelink = format_string($course->fullname, true, ['context' => $coursecontext]);
$url = new moodle_url('/grade/report/index.php', array('id' => $courseid));
$table->data[] = array(html_writer::link($url, $course->fullname));
$table->data[] = array(html_writer::link($url, $coursenamelink));
}
echo html_writer::table($table);
}