Skip to content

Commit

Permalink
MDL-30157 enrol_manual: Setting proper default
Browse files Browse the repository at this point in the history
The wrong default value was working because of count starting from 1.
  • Loading branch information
David Monllao committed Sep 15, 2015
1 parent f495510 commit 32f1e17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions enrol/manual/yui/quickenrolment/quickenrolment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down Expand Up @@ -608,7 +608,7 @@ YUI.add('moodle-enrol_manual-quickenrolment', function(Y) {
value : 0
},
defaultStartDate : {
value : 2,
value : 3,
validator : Y.Lang.isNumber
},
defaultDuration : {
Expand Down

0 comments on commit 32f1e17

Please sign in to comment.