diff --git a/group/clientlib.js b/group/clientlib.js index f8183485957..83c2c542f6d 100644 --- a/group/clientlib.js +++ b/group/clientlib.js @@ -77,7 +77,9 @@ function UpdatableGroupsCombo(wwwRoot, courseId) { */ // Hide the updategroups input since AJAX will take care of this. - YAHOO.util.Dom.setStyle("updategroups", "display", "none"); + YUI().use('yui2-dom', function (Y) { + Y.YUI2.util.Dom.setStyle("updategroups", "display", "none"); + }); } @@ -129,7 +131,9 @@ function UpdatableMembersCombo(wwwRoot, courseId) { }; // Hide the updatemembers input since AJAX will take care of this. - YAHOO.util.Dom.setStyle("updatemembers", "display", "none"); + YUI().use('yui2-dom', function (Y) { + Y.YUI2.util.Dom.setStyle("updatemembers", "display", "none"); + }); } /** @@ -181,7 +185,10 @@ UpdatableMembersCombo.prototype.refreshMembers = function () { if(singleSelection) { var sUrl = this.wwwRoot+"/group/index.php?id="+this.courseId+"&group="+groupId+"&act_ajax_getmembersingroup"; - YAHOO.util.Connect.asyncRequest("GET", sUrl, this.connectCallback, null); + var callback = this.connectCallback; + YUI().use('yui2-connection', function (Y) { + Y.YUI2.util.Connect.asyncRequest("GET", sUrl, callback, null); + }); } }; diff --git a/group/index.php b/group/index.php index 7500cc4c54f..1c9a6cdb88d 100644 --- a/group/index.php +++ b/group/index.php @@ -56,7 +56,6 @@ $PAGE->set_url($url); // Make sure that the user has permissions to manage groups. require_login($course); -$PAGE->requires->yui2_lib('connection'); $PAGE->requires->js('/group/clientlib.js'); $context = context_course::instance($course->id); diff --git a/group/members.php b/group/members.php index 2f65beb1275..421d1d34e16 100644 --- a/group/members.php +++ b/group/members.php @@ -84,7 +84,6 @@ $strusergroupmembership = get_string('usergroupmembership', 'group'); $groupname = format_string($group->name); -$PAGE->requires->yui2_lib('connection'); $PAGE->requires->js('/group/clientlib.js'); $PAGE->navbar->add($strparticipants, new moodle_url('/user/index.php', array('id'=>$course->id))); $PAGE->navbar->add($strgroups, new moodle_url('/group/index.php', array('id'=>$course->id)));