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/activity_info
|
|
|
19 |
|
|
|
20 |
Container to display activity information such as:
|
|
|
21 |
- Activity dates
|
|
|
22 |
- Activity completion requirements (automatic completion)
|
|
|
23 |
- Manual completion button
|
|
|
24 |
|
|
|
25 |
Example context (json):
|
|
|
26 |
{
|
|
|
27 |
"activityname": "Course announcements",
|
|
|
28 |
"hascompletion": true,
|
|
|
29 |
"uservisible": true,
|
|
|
30 |
"hasdates": true,
|
|
|
31 |
"isautomatic": true,
|
|
|
32 |
"istrackeduser": true,
|
|
|
33 |
"showmanualcompletion": true,
|
|
|
34 |
"activitydates": [
|
|
|
35 |
{
|
|
|
36 |
"label": "Opens:",
|
|
|
37 |
"timestamp": 1293876000
|
|
|
38 |
}
|
|
|
39 |
],
|
|
|
40 |
"completiondetails": [
|
|
|
41 |
{
|
|
|
42 |
"statuscomplete": 1,
|
|
|
43 |
"description": "Viewed"
|
|
|
44 |
},
|
|
|
45 |
{
|
|
|
46 |
"statusincomplete": 1,
|
|
|
47 |
"description": "Receive a grade"
|
|
|
48 |
}
|
|
|
49 |
]
|
|
|
50 |
}
|
|
|
51 |
}}
|
|
|
52 |
<div data-region="activity-information" data-activityname="{{activityname}}" class="activity-information">
|
|
|
53 |
|
|
|
54 |
{{#hascompletion}}
|
|
|
55 |
{{#uservisible}}
|
|
|
56 |
<div class="completion-info" data-region="completion-info">
|
|
|
57 |
{{#isautomatic}}
|
|
|
58 |
<div class="automatic-completion-conditions" data-region ="completionrequirements" role="list" aria-label="{{#str}}completionrequirements, core_course, {{activityname}}{{/str}}">
|
|
|
59 |
{{#completiondetails}}
|
|
|
60 |
{{> core_course/completion_automatic }}
|
|
|
61 |
{{/completiondetails}}
|
|
|
62 |
</div>
|
|
|
63 |
{{/isautomatic}}
|
|
|
64 |
{{^isautomatic}}
|
|
|
65 |
{{#showmanualcompletion}}
|
|
|
66 |
{{> core_course/completion_manual }}
|
|
|
67 |
{{/showmanualcompletion}}
|
|
|
68 |
{{/isautomatic}}
|
|
|
69 |
</div>
|
|
|
70 |
{{/uservisible}}
|
|
|
71 |
{{/hascompletion}}
|
|
|
72 |
|
|
|
73 |
{{#hasdates}}
|
|
|
74 |
<div data-region="activity-dates" class="activity-dates">
|
|
|
75 |
{{#activitydates}}
|
|
|
76 |
{{>core_course/activity_date}}
|
|
|
77 |
{{/activitydates}}
|
|
|
78 |
</div>
|
|
|
79 |
{{/hasdates}}
|
|
|
80 |
</div>
|