MDL-58138 completion: changes after rebasing
[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}}
6b3b9c1d 36<div class="row m-b-1 row-fluid">
0b620801
AG
37 <div class="activityinstance col-sm-6 span6">
38 <div class="mod-indent-outer"></div>
39 <div>
0cbc248d 40 {{#canmanage}}
8db355c5
JD
41 <label class="accesshide" for="selectactivity_{{cmid}}">Select {{modname}}</label>
42 <input type="checkbox" id="selectactivity_{{cmid}}" class="m-r-1" name="cmid[]" data-section="{{sectionnumber}}" value="{{cmid}}" aria-label="{{#str}}checkactivity, completion, {{modname}}{{/str}}">
0cbc248d 43 {{/canmanage}}
7f53e8aa 44 <a href="{{url}}">
0b620801
AG
45 <img src="{{icon}}" class="iconlarge activityicon" alt=" " role="presentation" />
46 <span class="instancename">{{modname}}</span>
47 </a>
48 </div>
49 </div>
6b3b9c1d
JD
50 <div class="activity-completionstatus col-sm-6 span6" id="completionstatus_{{cmid}}">
51 <div class="col-sm-1 span1 p-l-0">
0b620801 52 {{#completionstatus.icon}}
6b3b9c1d 53 {{{completionstatus.icon}}}
0b620801
AG
54 {{/completionstatus.icon}}
55 {{^completionstatus.icon}}
56 <span class="m-r-3"></span>
57 {{/completionstatus.icon}}
58 </div>
6b3b9c1d 59 <div class="col-sm-11 span11 p-l-0">
0b620801
AG
60 <span class="text-muted muted">{{{completionstatus.string}}}</span>
61 </div>
62 </div>
63</div>
64{{/activities}}