Skip to content

Commit

Permalink
MDL-29692 enrol: cohort: Fix default role issue in Chrome
Browse files Browse the repository at this point in the history
This is related to MDL-24280, the issue still persists in Chrome. The patch
fixes it for Chrome and works fine for the most major browsers.
  • Loading branch information
Ruslan Kabalin authored and Sam Hemelryk committed Oct 10, 2011
1 parent 3070626 commit 7757237
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions enrol/cohort/yui/quickenrolment/quickenrolment.js
Expand Up @@ -122,11 +122,7 @@ YUI.add('moodle-enrol_cohort-quickenrolment', function(Y) {
break;
case 'defaultcohortroleloaded':
defaultrole = this.get(DEFAULTCOHORTROLE);
panel.get('contentBox').one('.'+CSS.PANELROLES).all('option').each(function(){
if (this.get('value')==defaultrole) {
this.setAttribute('selected', true);
}
});
panel.get('contentBox').one('.'+CSS.PANELROLES+' select').set('value', defaultrole);
break;
}
},
Expand Down Expand Up @@ -339,4 +335,4 @@ YUI.add('moodle-enrol_cohort-quickenrolment', function(Y) {
}
}

}, '@VERSION@', {requires:['base','node', 'overlay', 'io-base', 'test', 'json-parse', 'event-delegate', 'dd-plugin', 'event-key', 'moodle-enrol-notification']});
}, '@VERSION@', {requires:['base','node', 'overlay', 'io-base', 'test', 'json-parse', 'event-delegate', 'dd-plugin', 'event-key', 'moodle-enrol-notification']});

0 comments on commit 7757237

Please sign in to comment.