| Línea 21... |
Línea 21... |
| 21 |
|
21 |
|
| 22 |
Example context (json):
|
22 |
Example context (json):
|
| 23 |
{
|
23 |
{
|
| 24 |
"cmid": 0,
|
24 |
"cmid": 0,
|
| 25 |
"overallcomplete": true,
|
25 |
"overallcomplete": true,
|
| - |
|
26 |
"overallincomplete": false,
|
| 26 |
"overallincomplete": false
|
27 |
"normalbutton": true
|
| 27 |
}
|
28 |
}
|
| 28 |
}}
|
29 |
}}
|
| 29 |
{{#istrackeduser}}
|
30 |
{{#istrackeduser}}
|
| - |
|
31 |
{{#overallcomplete}}
|
| 30 |
{{#overallcomplete}}
|
32 |
<button
|
| - |
|
33 |
class="btn btn-subtle-success {{^normalbutton}}btn-sm{{/normalbutton}} text-nowrap"
|
| - |
|
34 |
data-action="toggle-manual-completion"
|
| - |
|
35 |
data-toggletype="manual:undo"
|
| - |
|
36 |
data-cmid="{{cmid}}"
|
| - |
|
37 |
data-activityname="{{activityname}}"
|
| 31 |
<button class="btn btn-success btn-sm text-nowrap" data-action="toggle-manual-completion" data-toggletype="manual:undo" data-cmid="{{cmid}}" data-activityname="{{activityname}}" data-withavailability="{{withavailability}}" {{!
|
38 |
data-withavailability="{{withavailability}}" {{!
|
| 32 |
}}{{#accessibledescription}}{{!
|
39 |
}}{{#accessibledescription}}{{!
|
| 33 |
}}title="{{.}}" {{!
|
40 |
}}title="{{.}}" {{!
|
| 34 |
}}aria-label="{{.}}" {{!
|
41 |
}}aria-label="{{.}}" {{!
|
| 35 |
}}{{/accessibledescription}}{{!
|
42 |
}}{{/accessibledescription}}{{!
|
| 36 |
}}{{^accessibledescription}}{{!
|
43 |
}}{{^accessibledescription}}{{!
|
| 37 |
}}title="{{#str}}completion_manual:aria:done, course, {{activityname}} {{/str}}" {{!
|
44 |
}}title="{{#str}}completion_manual:aria:done, course, {{activityname}} {{/str}}" {{!
|
| 38 |
}}aria-label="{{#str}}completion_manual:aria:done, course, {{activityname}} {{/str}}" {{!
|
45 |
}}aria-label="{{#str}}completion_manual:aria:done, course, {{activityname}} {{/str}}" {{!
|
| - |
|
46 |
}}{{/accessibledescription}}
|
| 39 |
}}{{/accessibledescription}}>
|
47 |
>
|
| 40 |
<i class="fa fa-check" aria-hidden="true"></i> {{#str}} completion_manual:done, core_course {{/str}}
|
48 |
<i class="fa fa-check" aria-hidden="true"></i> {{#str}} completion_manual:done, core_course {{/str}}
|
| 41 |
</button>
|
49 |
</button>
|
| 42 |
{{/overallcomplete}}
|
50 |
{{/overallcomplete}}
|
| - |
|
51 |
{{#overallincomplete}}
|
| 43 |
{{#overallincomplete}}
|
52 |
<button
|
| - |
|
53 |
class="btn btn-subtle-body {{^normalbutton}}btn-sm{{/normalbutton}} text-nowrap"
|
| - |
|
54 |
data-action="toggle-manual-completion"
|
| - |
|
55 |
data-toggletype="manual:mark-done"
|
| - |
|
56 |
data-cmid="{{cmid}}"
|
| - |
|
57 |
data-activityname="{{activityname}}"
|
| 44 |
<button class="btn btn-outline-secondary btn-sm text-nowrap" data-action="toggle-manual-completion" data-toggletype="manual:mark-done" data-cmid="{{cmid}}" data-activityname="{{activityname}}" data-withavailability="{{withavailability}}" {{!
|
58 |
data-withavailability="{{withavailability}}" {{!
|
| 45 |
}}{{#accessibledescription}}{{!
|
59 |
}}{{#accessibledescription}}{{!
|
| 46 |
}}title="{{.}}" {{!
|
60 |
}}title="{{.}}" {{!
|
| 47 |
}}aria-label="{{.}}" {{!
|
61 |
}}aria-label="{{.}}" {{!
|
| 48 |
}}{{/accessibledescription}}{{!
|
62 |
}}{{/accessibledescription}}{{!
|
| 49 |
}}{{^accessibledescription}}{{!
|
63 |
}}{{^accessibledescription}}{{!
|
| 50 |
}}title="{{#str}}completion_manual:aria:markdone, course, {{activityname}} {{/str}}" {{!
|
64 |
}}title="{{#str}}completion_manual:aria:markdone, course, {{activityname}} {{/str}}" {{!
|
| 51 |
}}aria-label="{{#str}}completion_manual:aria:markdone, course, {{activityname}} {{/str}}" {{!
|
65 |
}}aria-label="{{#str}}completion_manual:aria:markdone, course, {{activityname}} {{/str}}" {{!
|
| - |
|
66 |
}}{{/accessibledescription}}
|
| 52 |
}}{{/accessibledescription}}>
|
67 |
>
|
| 53 |
{{#str}} completion_manual:markdone, core_course {{/str}}
|
68 |
{{#str}} completion_manual:markdone, core_course {{/str}}
|
| 54 |
</button>
|
69 |
</button>
|
| 55 |
{{/overallincomplete}}
|
70 |
{{/overallincomplete}}
|
| 56 |
{{/istrackeduser}}
|
71 |
{{/istrackeduser}}
|
| - |
|
72 |
{{^istrackeduser}}
|
| 57 |
{{^istrackeduser}}
|
73 |
<button
|
| - |
|
74 |
class="btn btn-subtle-body {{^normalbutton}}btn-sm{{/normalbutton}} text-nowrap"
|
| - |
|
75 |
disabled
|
| 58 |
<button class="btn btn-outline-secondary btn-sm text-nowrap" disabled>
|
76 |
>
|
| 59 |
{{#str}} completion_manual:markdone, core_course {{/str}}
|
77 |
{{#str}} completion_manual:markdone, core_course {{/str}}
|
| 60 |
</button>
|
78 |
</button>
|
| Línea 61... |
Línea 79... |
| 61 |
{{/istrackeduser}}
|
79 |
{{/istrackeduser}}
|
| 62 |
|
80 |
|
| 63 |
{{#js}}
|
81 |
{{#js}}
|
| 64 |
require(['core_course/manual_completion_toggle'], toggle => {
|
82 |
require(['core_course/manual_completion_toggle'], toggle => {
|
| 65 |
toggle.init()
|
83 |
toggle.init();
|