Merge branch 'MDL-40527' of git://github.com/timhunt/moodle

This commit is contained in:
Sam Hemelryk 2013-07-10 10:31:39 +12:00
commit a8402cc115

View File

@ -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);
}