Merge branch 'MDL-48248-master' of git://github.com/FMCorz/moodle

This commit is contained in:
David Monllao
2016-05-30 13:02:34 +08:00
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -89,6 +89,9 @@ if ($extendperiod) {
} else {
$defaultperiod = $instance->enrolperiod;
}
if (!isset($periodmenu[$defaultperiod])) {
$periodmenu[$defaultperiod] = get_string('numdays', '', floor($defaultperiod / DAYSECS));
}
if (empty($extendbase)) {
if (!$extendbase = get_config('enrol_manual', 'enrolstart')) {
// Default to now if there is no system setting.
+4
View File
@@ -237,6 +237,10 @@ YUI.add('moodle-enrol_manual-quickenrolment', function(Y) {
}
select.append(option);
}
if (!index) {
select.append(create('<option value="'+defaultvalue+'">'+durationdays.replace('{a}', defaultvalue)+'</option>'));
index = ++count;
}
select.set('selectedIndex', index);
},
getAssignableRoles : function(){