mirror of
https://github.com/moodle/moodle.git
synced 2025-01-30 03:58:34 +01:00
Merge branch 'wip-mdl-41590' of git://github.com/rajeshtaneja/moodle
This commit is contained in:
commit
79257da228
@ -46,7 +46,12 @@ class enrol_meta_plugin extends enrol_plugin {
|
||||
} else if (empty($instance->name)) {
|
||||
$enrol = $this->get_name();
|
||||
$course = $DB->get_record('course', array('id'=>$instance->customint1));
|
||||
$coursename = format_string(get_course_display_name_for_list($course));
|
||||
if ($course) {
|
||||
$coursename = format_string(get_course_display_name_for_list($course));
|
||||
} else {
|
||||
// Use course id, if course is deleted.
|
||||
$coursename = $instance->customint1;
|
||||
}
|
||||
return get_string('pluginname', 'enrol_' . $enrol) . ' (' . $coursename . ')';
|
||||
} else {
|
||||
return format_string($instance->name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user