mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'wip-mdl-41590' of git://github.com/rajeshtaneja/moodle
This commit is contained in:
commit
79257da228
1 changed files with 6 additions and 1 deletions
|
@ -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));
|
||||
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…
Add table
Add a link
Reference in a new issue