From dfdef4a2314f731a7517d700d635a30e009cd314 Mon Sep 17 00:00:00 2001 From: Ruslan Kabalin Date: Fri, 7 Oct 2011 10:21:47 +0100 Subject: [PATCH] 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. --- enrol/cohort/yui/quickenrolment/quickenrolment.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/enrol/cohort/yui/quickenrolment/quickenrolment.js b/enrol/cohort/yui/quickenrolment/quickenrolment.js index e20dfc18b29..d45f3733c2c 100644 --- a/enrol/cohort/yui/quickenrolment/quickenrolment.js +++ b/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; } },