/** * Client-side JavaScript for group management interface. * @author vy-shane AT moodle.com * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @package groups */ /** * Class UpdatableGroupsCombo */ function UpdatableGroupsCombo(wwwRoot, courseId) { this.wwwRoot = wwwRoot; this.courseId = courseId; this.connectCallback = { success: function(o) { if (o.responseText !== undefined) { var groupsComboEl = document.getElementById("groups"); var membersComboEl = document.getElementById("members"); if (membersComboEl) { // Clear the members list box. while (membersComboEl.firstChild) { membersComboEl.removeChild(membersComboEl.firstChild); } } if (groupsComboEl && o.responseText) { var groups = eval("("+o.responseText+")"); // Populate the groups list box. for (var i=0; i