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:
Tim Hunt
2012-08-03 14:43:30 +01:00
parent 02814bfc18
commit e071bc1aa4
5 changed files with 20 additions and 19 deletions
+1 -1
View File
@@ -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));
}
}
}