MDL-29692 enrol: cohort: Fix default role issue in Chrome

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.
This commit is contained in:
Ruslan Kabalin
2011-10-07 10:53:58 +01:00
parent 3973662145
commit dfdef4a231
+1 -5
View File
@@ -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;
}
},