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 class="rui-activity-wrapper {{#hasdates}}rui-activity--hasdates{{/hasdates}} {{#hascompletion}}rui-activity--hascompletion{{/hascompletion}} {{^hascompletion}}rui-activity--hasnotcompletion{{/hascompletion}}">{{#hasdates}}
|
|
|
53 |
<div data-region="activity-information" data-activityname="{{activityname}}" class="rui-activity-information mr-auto">
|
|
|
54 |
<div data-region="activity-dates" class="rui-activity-dates">
|
|
|
55 |
<svg class="d-none d-md-flex mx-2" width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
56 |
<path d="M4.75 4.75V19.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
|
57 |
<path d="M8.75 12H19.25" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
|
58 |
<path d="M15.75 8.75L19.25 12L15.75 15.25" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
|
59 |
</svg>
|
|
|
60 |
{{#activitydates}}
|
|
|
61 |
{{>core_course/activity_date}}
|
|
|
62 |
{{/activitydates}}
|
|
|
63 |
</div>
|
|
|
64 |
</div>{{/hasdates}}{{#hascompletion}}
|
|
|
65 |
<div class="rui-completion-info">
|
|
|
66 |
{{#uservisible}}
|
|
|
67 |
<div data-region="completion-info">
|
|
|
68 |
{{#isautomatic}}
|
|
|
69 |
<div class="rui-completion-badges automatic-completion-conditions" data-region ="completionrequirements" role="list" aria-label="{{#str}}completionrequirements, core_course, {{activityname}}{{/str}}">
|
|
|
70 |
{{#completiondetails}}
|
|
|
71 |
{{> core_course/completion_automatic }}
|
|
|
72 |
{{/completiondetails}}
|
|
|
73 |
</div>
|
|
|
74 |
{{/isautomatic}}
|
|
|
75 |
</div>
|
|
|
76 |
{{/uservisible}}
|
|
|
77 |
</div>{{/hascompletion}}{{#hascompletion}}
|
|
|
78 |
{{^isautomatic}}
|
|
|
79 |
{{#uservisible}}
|
|
|
80 |
<div class="{{^isautomatic}}rui-completion-info--manual{{/isautomatic}}">
|
|
|
81 |
<div class="rui-completion-info-wrapper" data-region="completion-info">
|
|
|
82 |
{{#showmanualcompletion}}
|
|
|
83 |
{{> core_course/completion_manual }}
|
|
|
84 |
{{/showmanualcompletion}}
|
|
|
85 |
</div>
|
|
|
86 |
</div>
|
|
|
87 |
{{/uservisible}}
|
|
|
88 |
{{/isautomatic}}{{/hascompletion}}</div>
|