MDL-34704 couse, accesslib: improve $CFG->courselistshortnames
1. get_context_name should respect the $CFG->courselistshortnames setting. 2. When $CFG->courselistshortnames is on, what to display should use a language string, rather than string concatenation. This makes it possible for people to configure the display. For example, they might want 'My first course [M101]' instead of 'M101 My first course'.
This commit is contained in:
+1
-1
@@ -6319,7 +6319,7 @@ class context_course extends context {
|
||||
if ($short){
|
||||
$name .= format_string($course->shortname, true, array('context' => $this));
|
||||
} else {
|
||||
$name .= format_string($course->fullname);
|
||||
$name .= format_string(get_course_display_name_for_list($course));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user