芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/www/cepali/group/templates/index.mustache
{{! This file is part of Moodle - http://moodle.org/ Moodle is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Moodle is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Moodle. If not, see
. }} {{! @template core_group/index Template for the Groups page. Classes required for JS: * none Data attributes required for JS: * none Context variables required for this template: * courseid int The course ID. * selectedgroup string The initially selected group. * editgroupsettingsdisabled bool Whether to disable the "Edit group settings" button on load. * deletegroupdisabled bool Whether to disable the "Delete selected group" button on load. * addmembersdisabled bool Whether to disable the "Add/remove users" button on load. * groups array The list of groups. * members array The list of members, grouped based on roles. * undeletablegroups string A JSON string containing an array of group IDs that a user cannot delete. Example context (json): { "courseid": "1", "selectedgroup": "Group 1 (3)", "editgroupsettingsdisabled": false, "deletegroupdisabled": false, "addmembersdisabled": false, "groups": [ { "value": "1", "text": "Group 1 (3)", "selected": true }, { "value": "2", "text": "Group 2 (2)" } ], "members": [ { "role": "Student", "rolemembers": [ { "value": "1", "text": "John Doe" }, { "value": "2", "text": "Jane Doe" }, { "value": "3", "text": "John Smith" } ] } ], "undeletablegroups": "[1: true, 3: true]" } }}
{{#str}}groups{{/str}}
{{#groups}}
{{{text}}}
{{/groups}}
{{#str}}membersofselectedgroup, group{{/str}}
{{{selectedgroup}}}
{{#members}}
{{#rolemembers}}
{{{text}}}
{{/rolemembers}}
{{/members}}
{{#js}} require(['jquery', 'core/yui'], function($) { $("#groups").change(function() { M.core_group.membersCombo.refreshMembers(); }); M.core_group.init_index(Y, "{{wwwroot}}", {{courseid}}); var undeletableGroups = JSON.parse('{{{undeletablegroups}}}'); M.core_group.groupslist(Y, undeletableGroups); }); {{/js}}