Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit dfdef4a2314f731a7517d700d635a30e009cd314 1 parent 3973662
Ruslan Kabalin authored
Showing with 1 addition and 5 deletions.
  1. +1 −5 enrol/cohort/yui/quickenrolment/quickenrolment.js
View
6 enrol/cohort/yui/quickenrolment/quickenrolment.js
@@ -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;
}
},
Please sign in to comment.
Something went wrong with that request. Please try again.