mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-40527 enrol meta: respect $CFG->courselistshortnames
Thanks to James Henestofel for working this out in MDL-37558. That issue got complex, so I am just submitting this simple part of it for integration.
This commit is contained in:
parent
f8e6e5bc30
commit
70f4ac5aea
@ -45,7 +45,9 @@ class enrol_meta_plugin extends enrol_plugin {
|
||||
return get_string('pluginname', 'enrol_'.$enrol);
|
||||
} else if (empty($instance->name)) {
|
||||
$enrol = $this->get_name();
|
||||
return get_string('pluginname', 'enrol_'.$enrol) . ' (' . format_string($DB->get_field('course', 'fullname', array('id'=>$instance->customint1))) . ')';
|
||||
$course = $DB->get_record('course', array('id'=>$instance->customint1));
|
||||
$coursename = format_string(get_course_display_name_for_list($course));
|
||||
return get_string('pluginname', 'enrol_' . $enrol) . ' (' . $coursename . ')';
|
||||
} else {
|
||||
return format_string($instance->name);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user