weekly release 4.0dev
[moodle.git] / course / templates / activityinstance.mustache
CommitLineData
0b620801
AG
1{{!
2 This file is part of Moodle - http://moodle.org/
3
4 Moodle is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 Moodle is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16}}
17{{!
18 @template core_course/activityinstance
19
20 Activity completion selector.
21
22 Example context (json):
23 {
24 "activities": [{
25 "cmid": "4",
26 "modname": "Test activity",
7f53e8aa 27 "icon": "https://raw.githubusercontent.com/moodle/moodle/master/mod/feedback/pix/icon.png",
0b620801
AG
28 "completionstatus": {
29 "string": "Manual",
7f53e8aa 30 "icon": "https://raw.githubusercontent.com/moodle/moodle/master/pix/i/completion-manual-enabled.png"
0b620801
AG
31 }
32 }]
33 }
34}}
35{{#activities}}
4394f9e3 36<div class="row mb-1">
9396731e 37 <div class="activityinstance col-6">
0b620801
AG
38 <div class="mod-indent-outer"></div>
39 <div>
273d3106
JD
40 {{#canmanage}}
41 <label class="accesshide" for="selectactivity_{{cmid}}">{{#str}}select, completion{{/str}} {{modname}}</label>
5cac5fa4 42 <input type="checkbox" id="selectactivity_{{cmid}}" class="mr-1" name="cmid[]" data-section="{{sectionnumber}}" value="{{cmid}}" aria-label="{{#str}}checkactivity, completion, {{{modname}}}{{/str}}">
273d3106
JD
43 {{/canmanage}}
44 <a href="{{url}}">
45 <img src="{{icon}}" class="iconlarge activityicon" alt=" " role="presentation" />
b453e4c9 46 <span class="instancename">{{{modname}}}</span>
273d3106 47 </a>
0b620801
AG
48 </div>
49 </div>
9396731e 50 <div class="activity-completionstatus col-6" id="completionstatus_{{cmid}}">
4394f9e3 51 <div class="col-sm-1 pl-0">
0b620801 52 {{#completionstatus.icon}}
6b3b9c1d 53 {{{completionstatus.icon}}}
0b620801
AG
54 {{/completionstatus.icon}}
55 {{^completionstatus.icon}}
5cac5fa4 56 <span class="mr-3"></span>
0b620801
AG
57 {{/completionstatus.icon}}
58 </div>
4394f9e3 59 <div class="col-sm-11 pl-0">
0b620801
AG
60 <span class="text-muted muted">{{{completionstatus.string}}}</span>
61 </div>
62 </div>
63</div>
64{{/activities}}