Current Path : /var/www/ljmtc/cbt/mod/grouptool/templates/ |
Current File : /var/www/ljmtc/cbt/mod/grouptool/templates/overviewgroup.mustache |
{{! This file is part of mod_grouptool for 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 <http://www.gnu.org/licenses/>. }} {{! @template mod_grouptool/overviewgroup Grouptool's overview group template. The purpose of this template is to display a single group in mod_grouptool's group overview. Classes required for JS: * none Data attributes required for JS: * none Context variables required for this template: * name The group's name * outdated True if group is not up to date * uptodate True if group is up to date * inactive True if group is not active * downloadurl URL to download group's data (format parameter gets appended) * total Total group places * registered occupied group places * queued occupied queue places * free amount of free places * statushelp help icon for status column * userlink * reg_data * mreg_data * queue_data Example context (json): { "name": "Groupname", "outdated": 1, "uptodate": 1, "inactive": 1, "downloadurl": "https://example.com/mod/grouptool/download.php?id=1&groupid=1&sesskey=Om8VlPBECz&tab=overview&inactive=1", "total": "5", "registered": "2", "queued": "3", "free": "7", "statushelp": { "heading": "Status", "text": "Helptext with HTML-Markup!", "alt": "Help with Status", "icon": { "attributes": [ { "name": "alt", "value": "Help with Status" }, { "name": "title","value": "Help with Status" }, { "name": "src", "value" : "http:\/\/localhost\/moodle_33\/theme\/image.php\/boost\/core\/1494407719\/help" } ], "extraclasses": "iconhelp" }, "linktext": null, "title": "Help with Status", "url": "http:\/\/localhost\/moodle_33\/help.php?component=mod_grouptool&identifier=status&lang=en", "ltr": true }, "userlink": "https://example.com/user/view.php?course=4", "reg_data": [ {"userid": 1, "status": "✔", "name": "Clark Kent", "idnumber": "04567890", "email": "clark@dailyplanet.com"}, {"userid": 2, "status": "+", "name": "Bruce Wayne", "idnumber": "12345678", "email": "office@wayne-enterprises.com"} ], "mreg_data": [ {"userid": 3, "status": "?", "name": "Stephen V Strange, M.D.", "idnumber": "90123456", "email": "magic@kamar-taj.np"}, {"userid": 4, "status": "?", "name": "Oliver Queen", "idnumber": "78901234", "email": "ras@nanda-parbat.org"} ], "queue_data": [ {"userid": 5, "rank": "1", "name": "Tony Stark", "idnumber": "56789012", "email": "genius@start-enterprises.com"}, {"userid": 6, "rank": "2", "name": "James Rhodes", "idnumber": "34567890", "email": "user6@example.com"} ] } }} <div class="box generalbox groupcontainer p-y-1 {{#inactive}}dimmed_text{{/inactive}}" id="yui_3_17_2_1_1494398782636_28"> <div class="groupinfo"> <h3>{{name}}{{! }}{{#outdated}}<small class="p-l-1"><i class="fa fa-user-circle text-info" title = "{{! }}{{#str}} not_synced_reg_present, mod_grouptool {{/str}}" aria-hidden="true"></i></small>{{/outdated}} </h3> <div class="download"><span class="title">{{#str}} download, core {{/str}}:</span>{{! }}<a href="{{downloadurl}}&format={{formattxt}}">.TXT</a>{{! }}<a href="{{downloadurl}}&format={{formatxlsx}}">.XLSX</a>{{! }}<a href="{{downloadurl}}&format={{formatpdf}}">.PDF</a>{{! }}<a href="{{downloadurl}}&format={{formatods}}">.ODS</a>{{! }}</div> <span class="groupsize">{{#str}}total, mod_grouptool{{/str}} {{total}}</span> / {{! }}<span class="registered">{{#str}}registered, mod_grouptool{{/str}} {{registered}}</span> / {{! }}<span class="queued">{{#str}}queued, mod_grouptool{{/str}} {{queued}}</span> / {{! }}<span class="free">{{#str}}free, mod_grouptool{{/str}} {{free}}</span> </div> <table class="centeredblock userlist table table-striped table-hover table-condensed"> <thead> <tr> <th class="text-center">{{#str}}status, mod_grouptool{{/str}}{{#statushelp}}{{>core/help_icon}}{{/statushelp}}</th> <th class="">{{#str}} fullname, core {{/str}}</th> <th class="">{{#str}} idnumber, core {{/str}}</th> <th class="">{{#str}} email, core {{/str}}</th> </tr> </thead> <tbody> {{#reg_data}} <tr class=""> <td class="status">{{status}}</td> <td class="userlink"><a href="{{userlink}}&id={{userid}}" title="{{name}}">{{name}}</a></td> <td class="idnumber"><span class="idnumber">{{idnumber}}</span></td> <td class="email"><span class="email">{{email}}</span></td> </tr> {{/reg_data}} {{#mreg_data}} <tr class=""> <td class="status">{{status}}</td> <td class="userlink"><a href="{{userlink}}&id={{userid}}" title="{{name}}">{{name}}</a></td> <td class="idnumber"><span class="idnumber">{{idnumber}}</span></td> <td class="email"><span class="email">{{email}}</span></td> </tr> {{/mreg_data}} {{^reg_data}}{{^mreg_data}} <tr class="regentry reg"> <td class="no_registrations" colspan="4">{{#str}} no_registrations, mod_grouptool {{/str}}</td> </tr> {{/mreg_data}}{{/reg_data}} {{#queue_data}} <tr class=""> <td class="status">{{rank}}</td> <td class="userlink"><a href="{{userlink}}&id={{userid}}" title="{{name}}">{{name}}</a></td> <td class="idnumber"><span class="idnumber">{{idnumber}}</span></td> <td class="email"><span class="email">{{email}}</span></td> </tr> {{/queue_data}} {{^queue_data}} <tr class="queueentry queue"> <td class="no_queues" colspan="4">{{#str}} nobody_queued, mod_grouptool {{/str}}</td> </tr> {{/queue_data}} </tbody> </table> </div>