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/defaultactivitycompletion
|
|
|
19 |
|
|
|
20 |
Activity completion selector.
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"courseid": "2",
|
|
|
25 |
"sesskey": "AAAAAA",
|
|
|
26 |
"modules": [{
|
|
|
27 |
"id": "10",
|
|
|
28 |
"formattedname": "Assignment",
|
|
|
29 |
"canmanage": true,
|
|
|
30 |
"icon": "https://raw.githubusercontent.com/moodle/moodle/master/mod/assign/pix/monologo.svg",
|
|
|
31 |
"completionstatus": {
|
|
|
32 |
"string": "Manual",
|
|
|
33 |
"icon": "https://raw.githubusercontent.com/moodle/moodle/master/pix/i/completion-manual-enabled.png"
|
|
|
34 |
}
|
|
|
35 |
}],
|
|
|
36 |
"issite": true
|
|
|
37 |
}
|
|
|
38 |
}}
|
|
|
39 |
<div class="container-fluid">
|
|
|
40 |
<div class="row my-5 defaultactivitycompletion-header">
|
|
|
41 |
<div class="col">
|
|
|
42 |
{{#issite}}{{#str}}defaultactivitycompletionsite, core_completion{{/str}}{{/issite}}
|
|
|
43 |
{{^issite}}{{#str}}defaultactivitycompletioncourse, core_completion{{/str}}{{/issite}}
|
|
|
44 |
</div>
|
|
|
45 |
|
|
|
46 |
</div>
|
|
|
47 |
|
|
|
48 |
<div class="modules pt-3">
|
|
|
49 |
{{#modules}}
|
|
|
50 |
{{#canmanage}}
|
|
|
51 |
<div class="defaultactivitycompletion-item d-flex"
|
|
|
52 |
id="activitycompletion-{{id}}"
|
|
|
53 |
>
|
|
|
54 |
<a data-toggle="collapse"
|
|
|
55 |
href="#activitycompletioncollapse-{{id}}"
|
|
|
56 |
class="icons-collapse-expand {{#modulecollapsed}}collapsed{{/modulecollapsed}}"
|
|
|
57 |
aria-expanded="{{^modulecollapsed}}true{{/modulecollapsed}}{{#modulecollapsed}}false{{/modulecollapsed}}"
|
|
|
58 |
role="button"
|
|
|
59 |
>
|
|
|
60 |
<span class="collapsed-icon icon-no-margin mr-1"
|
|
|
61 |
title="{{#str}} expandcategory, core, {{formattedname}} {{/str}}">
|
|
|
62 |
<span class="dir-rtl-hide">{{#pix}} t/collapsedchevron, core {{/pix}}</span>
|
|
|
63 |
<span class="dir-ltr-hide">{{#pix}} t/collapsedchevron_rtl, core {{/pix}}</span>
|
|
|
64 |
<span class="sr-only">{{#str}} expandcategory, core, {{formattedname}} {{/str}}</span>
|
|
|
65 |
</span>
|
|
|
66 |
<span class="expanded-icon icon-no-margin mr-1"
|
|
|
67 |
title="{{#str}} collapsecategory, core, {{formattedname}} {{/str}}">
|
|
|
68 |
{{#pix}} t/expandedchevron, core {{/pix}}
|
|
|
69 |
<span class="sr-only">{{#str}} collapsecategory, core, {{formatedname}} {{/str}}</span>
|
|
|
70 |
</span>
|
|
|
71 |
<img class="iconlarge activityicon ml-4" src="{{icon}}" alt="" aria-hidden="true">
|
|
|
72 |
<h2 class="activityname ml-3 mb-0">{{{formattedname}}}</h2>
|
|
|
73 |
</a>
|
|
|
74 |
</div>
|
|
|
75 |
<div id="activitycompletioncollapse-{{id}}"
|
|
|
76 |
class="defaultactivitycompletion-item-content collapse multi-collapse {{^modulecollapsed}}show{{/modulecollapsed}}"
|
|
|
77 |
aria-labelledby="activitycompletion-{{id}}" role="group"
|
|
|
78 |
data-region="activitycompletion-{{name}}"
|
|
|
79 |
>
|
|
|
80 |
<hr class="row">
|
|
|
81 |
<div class="py-3">{{{formhtml}}}</div>
|
|
|
82 |
</div>
|
|
|
83 |
|
|
|
84 |
<hr class="row">
|
|
|
85 |
{{/canmanage}}
|
|
|
86 |
{{/modules}}
|
|
|
87 |
</div>
|
|
|
88 |
</div>
|