mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
Merge branch 'MDL-50699-master' of https://github.com/pauln/moodle
This commit is contained in:
commit
944455b514
@ -146,15 +146,15 @@ class mod_lesson_mod_form extends moodleform_mod {
|
||||
if ($mods = get_course_mods($COURSE->id)) {
|
||||
$modinstances = array();
|
||||
foreach ($mods as $mod) {
|
||||
|
||||
// get the module name and then store it in a new array
|
||||
// Get the module name and then store it in a new array.
|
||||
if ($module = get_coursemodule_from_instance($mod->modname, $mod->instance, $COURSE->id)) {
|
||||
if (isset($this->_cm->id) and $this->_cm->id != $mod->id){
|
||||
// Exclude this lesson, if it's already been saved.
|
||||
if (!isset($this->_cm->id) || $this->_cm->id != $mod->id) {
|
||||
$modinstances[$mod->id] = $mod->modname.' - '.$module->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
asort($modinstances); // sort by module name
|
||||
asort($modinstances); // Sort by module name.
|
||||
$modinstances=array(0=>get_string('none'))+$modinstances;
|
||||
|
||||
$mform->addElement('select', 'activitylink', get_string('activitylink', 'lesson'), $modinstances);
|
||||
|
Loading…
x
Reference in New Issue
Block a user