1 |
efrain |
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",
|
|
|
27 |
"icon": "https://raw.githubusercontent.com/moodle/moodle/master/mod/feedback/pix/monologo.svg",
|
|
|
28 |
"completionstatus": {
|
|
|
29 |
"string": "Manual",
|
|
|
30 |
"icon": "https://raw.githubusercontent.com/moodle/moodle/master/pix/i/completion-manual-enabled.png"
|
|
|
31 |
}
|
|
|
32 |
}]
|
|
|
33 |
}
|
|
|
34 |
}}
|
|
|
35 |
{{#activities}}
|
|
|
36 |
<div class="row mb-1">
|
|
|
37 |
<div class="activityinstance col-6">
|
|
|
38 |
<div class="mod-indent-outer"></div>
|
|
|
39 |
<div>
|
|
|
40 |
{{#canmanage}}
|
|
|
41 |
<label class="accesshide" for="selectactivity_{{cmid}}">{{#str}}select, completion{{/str}} {{modname}}</label>
|
|
|
42 |
<input type="checkbox" id="selectactivity_{{cmid}}" class="mr-1" name="cmid[]" data-section="{{sectionnumber}}" value="{{cmid}}" aria-label="{{#str}}checkactivity, completion, {{{modname}}}{{/str}}">
|
|
|
43 |
{{/canmanage}}
|
|
|
44 |
<a href="{{url}}">
|
|
|
45 |
<img src="{{icon}}" class="iconlarge activityicon" alt="">
|
|
|
46 |
<span class="instancename">{{{modname}}}</span>
|
|
|
47 |
</a>
|
|
|
48 |
</div>
|
|
|
49 |
</div>
|
|
|
50 |
<div class="activity-completionstatus col-6" id="completionstatus_{{cmid}}">
|
|
|
51 |
<div class="col-sm-1 pl-0">
|
|
|
52 |
{{#completionstatus.icon}}
|
|
|
53 |
{{{completionstatus.icon}}}
|
|
|
54 |
{{/completionstatus.icon}}
|
|
|
55 |
{{^completionstatus.icon}}
|
|
|
56 |
<span class="mr-3"></span>
|
|
|
57 |
{{/completionstatus.icon}}
|
|
|
58 |
</div>
|
|
|
59 |
<div class="col-sm-11 pl-0">
|
|
|
60 |
<span class="text-muted muted">{{{completionstatus.string}}}</span>
|
|
|
61 |
</div>
|
|
|
62 |
</div>
|
|
|
63 |
</div>
|
|
|
64 |
{{/activities}}
|