1 |
efrain |
1 |
{{!
|
|
|
2 |
This file is part of Moodle - http://moodle.org/
|
|
|
3 |
Moodle is free software: you can redistribute it and/or modify
|
|
|
4 |
it under the terms of the GNU General Public License as published by
|
|
|
5 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
6 |
(at your option) any later version.
|
|
|
7 |
Moodle is distributed in the hope that it will be useful,
|
|
|
8 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
9 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
10 |
GNU General Public License for more details.
|
|
|
11 |
You should have received a copy of the GNU General Public License
|
|
|
12 |
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
13 |
}}
|
|
|
14 |
{{!
|
|
|
15 |
@template core_courseformat/local/content/cm/completion_dialog
|
|
|
16 |
|
|
|
17 |
Container to display activity completion dialog content.
|
|
|
18 |
|
|
|
19 |
Example context (json):
|
|
|
20 |
{
|
|
|
21 |
"istrackeduser": true,
|
|
|
22 |
"hasconditions": true,
|
|
|
23 |
"completiondetails": [
|
|
|
24 |
{
|
|
|
25 |
"statuscomplete": 1,
|
|
|
26 |
"description": "View"
|
|
|
27 |
},
|
|
|
28 |
{
|
|
|
29 |
"statusincomplete": 1,
|
|
|
30 |
"description": "Receive a grade"
|
|
|
31 |
}
|
|
|
32 |
]
|
|
|
33 |
}
|
|
|
34 |
}}
|
|
|
35 |
<div class="completion-dialog p-2">
|
|
|
36 |
{{! Completion criterias. }}
|
|
|
37 |
{{#hasconditions}}
|
|
|
38 |
{{! Dialog header. }}
|
|
|
39 |
{{#istrackeduser}}
|
|
|
40 |
<strong>{{#str}}youmust, completion{{/str}}</strong>
|
|
|
41 |
{{/istrackeduser}}
|
|
|
42 |
{{^istrackeduser}}
|
|
|
43 |
<strong>{{#str}}studentsmust, completion{{/str}}</strong>
|
|
|
44 |
{{/istrackeduser}}
|
|
|
45 |
|
|
|
46 |
<div role="list">
|
|
|
47 |
{{#completiondetails}}
|
|
|
48 |
{{! Show completion status and description to tracked users. }}
|
|
|
49 |
{{#istrackeduser}}
|
|
|
50 |
{{#statuscomplete}}
|
|
|
51 |
<div class="d-flex mt-2 align-items-center" role="listitem" {{#accessibledescription}}title="{{.}}" aria-label="{{.}}"{{/accessibledescription}}>
|
|
|
52 |
<div>
|
|
|
53 |
{{#pix}}i/checked{{/pix}}
|
|
|
54 |
<span class="sr-only">{{#str}}completion_automatic:done, core_course{{/str}}</span>
|
|
|
55 |
</div>
|
|
|
56 |
<span>{{description}}</span>
|
|
|
57 |
</div>
|
|
|
58 |
{{/statuscomplete}}
|
|
|
59 |
{{#statuscompletefail}}
|
|
|
60 |
<div class="d-flex mt-2 align-items-center text-danger" role="listitem" {{#accessibledescription}}title="{{.}}" aria-label="{{.}}"{{/accessibledescription}}>
|
|
|
61 |
<div>
|
|
|
62 |
{{#pix}}e/cancel{{/pix}}
|
|
|
63 |
<span class="sr-only">{{#str}}completion_automatic:failed, core_course{{/str}}</span>
|
|
|
64 |
</div>
|
|
|
65 |
<span>{{description}}</span>
|
|
|
66 |
</div>
|
|
|
67 |
{{/statuscompletefail}}
|
|
|
68 |
{{#statusincomplete}}
|
|
|
69 |
<div class="d-flex mt-2 align-items-center" role="listitem" {{#accessibledescription}}title="{{.}}" aria-label="{{.}}"{{/accessibledescription}}>
|
|
|
70 |
<div>
|
|
|
71 |
{{#pix}}i/dot{{/pix}}
|
|
|
72 |
<span class="sr-only">{{#str}}completion_automatic:todo, core_course{{/str}}</span>
|
|
|
73 |
</div>
|
|
|
74 |
<span>{{description}}</span>
|
|
|
75 |
</div>
|
|
|
76 |
{{/statusincomplete}}
|
|
|
77 |
{{/istrackeduser}}
|
|
|
78 |
|
|
|
79 |
{{! Show only description (without status) to non-tracked users. }}
|
|
|
80 |
{{^istrackeduser}}
|
|
|
81 |
<div class="d-flex mt-2" role="listitem">
|
|
|
82 |
<div>{{#pix}}i/dot{{/pix}}</div>
|
|
|
83 |
<span>{{description}}</span>
|
|
|
84 |
</div>
|
|
|
85 |
{{/istrackeduser}}
|
|
|
86 |
{{/completiondetails}}
|
|
|
87 |
|
|
|
88 |
{{! Show also manual completion description in the list to non-tracked users. }}
|
|
|
89 |
{{#ismanual}}
|
|
|
90 |
{{^istrackeduser}}
|
|
|
91 |
<div class="d-flex mt-2" role="listitem">
|
|
|
92 |
<div>{{#pix}}i/dot{{/pix}}</div>
|
|
|
93 |
<span>{{#str}} completion_manual:markdone, core_course {{/str}}</span>
|
|
|
94 |
</div>
|
|
|
95 |
{{/istrackeduser}}
|
|
|
96 |
{{/ismanual}}
|
|
|
97 |
</div>
|
|
|
98 |
{{/hasconditions}}
|
|
|
99 |
|
|
|
100 |
{{! Show message if there are no completion criterias. }}
|
|
|
101 |
{{^hasconditions}}
|
|
|
102 |
{{#istrackeduser}}
|
|
|
103 |
<span>{{#str}}emptyconditionsinfo, completion{{/str}}</span>
|
|
|
104 |
{{/istrackeduser}}
|
|
|
105 |
{{^istrackeduser}}
|
|
|
106 |
<span class="text-danger">{{#pix}} req, core {{/pix}}{{#str}}emptyconditionswarning, completion{{/str}}</span>
|
|
|
107 |
{{/istrackeduser}}
|
|
|
108 |
{{/hasconditions}}
|
|
|
109 |
|
|
|
110 |
{{! Show edit link to editing teachers. }}
|
|
|
111 |
{{#editing}}
|
|
|
112 |
{{#editurl}}
|
|
|
113 |
<div class="editcompletion border-top mt-3 pt-3">
|
|
|
114 |
<a href="{{editurl}}" class="btn btn-sm">
|
|
|
115 |
{{#hasconditions}}{{#pix}} i/edit, core {{/pix}}{{#str}}editconditions, completion{{/str}}{{/hasconditions}}
|
|
|
116 |
{{^hasconditions}}{{#pix}} t/add, core {{/pix}}{{#str}}addconditions, completion{{/str}}{{/hasconditions}}
|
|
|
117 |
</a>
|
|
|
118 |
</div>
|
|
|
119 |
{{/editurl}}
|
|
|
120 |
{{/editing}}
|
|
|
121 |
</div>
|