MDL-30157 enrol_manual: Setting proper default

The wrong default value was working because of count starting from 1.
This commit is contained in:
David Monllao
2015-09-15 16:25:25 +08:00
parent f495510548
commit 32f1e17a01
+2 -2
View File
@@ -215,12 +215,12 @@ YUI.add('moodle-enrol_manual-quickenrolment', function(Y) {
var options = this.get(UEP.OPTIONSTARTDATE);
var index = 0, count = 0;
for (var i in options) {
count++;
var option = create('<option value="'+i+'">'+options[i]+'</option>');
if (i == defaultvalue) {
index = count;
}
select.append(option);
count++;
}
select.set('selectedIndex', index);
},
@@ -608,7 +608,7 @@ YUI.add('moodle-enrol_manual-quickenrolment', function(Y) {
value : 0
},
defaultStartDate : {
value : 2,
value : 3,
validator : Y.Lang.isNumber
},
defaultDuration : {