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_user/upcoming_activities_due_insight_body
|
|
|
19 |
|
|
|
20 |
Template for the upcoming activity due insight
|
|
|
21 |
|
|
|
22 |
Context variables required for this template:
|
|
|
23 |
* activitiesdue array - Data for each activity due.
|
|
|
24 |
* userfirstname string - The user firstname.
|
|
|
25 |
|
|
|
26 |
Example context (json):
|
|
|
27 |
{
|
|
|
28 |
"userfirstname": "John",
|
|
|
29 |
"activitiesdue": [
|
|
|
30 |
{
|
|
|
31 |
"name": "Introduction to ASP is due",
|
|
|
32 |
"formattedtime": "31 January 2018",
|
|
|
33 |
"coursename": "Programming I",
|
|
|
34 |
"url": "https://www.google.com"
|
|
|
35 |
}
|
|
|
36 |
]
|
|
|
37 |
}
|
|
|
38 |
}}
|
|
|
39 |
|
|
|
40 |
{{! The styles defined here will be included in the Moodle web UI and in emails. Emails do not include Moodle
|
|
|
41 |
stylesheets so we want these styles to be applied to emails. However, they will also be included in the Moodle web UI.
|
|
|
42 |
The styles defined in the class .table have precedence over general styles at tag level, so these styles are only
|
|
|
43 |
applied to emails.}}
|
|
|
44 |
<head><style>
|
|
|
45 |
table {
|
|
|
46 |
text-align: justify;
|
|
|
47 |
margin-bottom: 1rem;
|
|
|
48 |
margin-top: 1rem;
|
|
|
49 |
}
|
|
|
50 |
table tr.when {
|
|
|
51 |
background-color: #e9ecef;
|
|
|
52 |
}
|
|
|
53 |
table th {
|
|
|
54 |
padding: 1rem .75rem 1rem .75rem;
|
|
|
55 |
font-weight: 400;
|
|
|
56 |
font-size: larger;
|
|
|
57 |
border-top: 1px solid #dee2e6;
|
|
|
58 |
}
|
|
|
59 |
table td {
|
|
|
60 |
padding: .75rem;
|
|
|
61 |
}
|
|
|
62 |
table td.link {
|
|
|
63 |
border-top: 1px solid #dee2e6;
|
|
|
64 |
border-bottom: 1px solid #dee2e6;
|
|
|
65 |
}
|
|
|
66 |
</style></head>
|
|
|
67 |
|
|
|
68 |
<div>
|
|
|
69 |
{{#str}} youhaveupcomingactivitiesdueinfo, moodle, {{userfirstname}} {{/str}}
|
|
|
70 |
<br/><br/>
|
|
|
71 |
|
|
|
72 |
{{#activitiesdue}}
|
|
|
73 |
<table class="table upcoming-activity-due">
|
|
|
74 |
<thead>
|
|
|
75 |
<tr>
|
|
|
76 |
<th scope="col" class="h5">
|
|
|
77 |
{{#icon}}
|
|
|
78 |
{{#pix}} {{key}}, {{component}}, {{title}} {{alttext}} {{/pix}}
|
|
|
79 |
{{/icon}}
|
|
|
80 |
{{name}}
|
|
|
81 |
</th>
|
|
|
82 |
</tr>
|
|
|
83 |
</thead>
|
|
|
84 |
<tbody>
|
|
|
85 |
<tr class="when">
|
|
|
86 |
<td><strong>{{#str}} whendate, calendar, {{formattedtime}} {{/str}}</strong></td>
|
|
|
87 |
</tr>
|
|
|
88 |
<tr>
|
|
|
89 |
<td>{{#str}} coursetitle, moodle, {"course": "{{coursename}}" } {{/str}}</td>
|
|
|
90 |
</tr>
|
|
|
91 |
<tr>
|
|
|
92 |
<td class="link"><a href="{{url}}">{{#str}} gotoactivity, calendar{{/str}}</a></td>
|
|
|
93 |
</tr>
|
|
|
94 |
</tbody>
|
|
|
95 |
</table>
|
|
|
96 |
{{/activitiesdue}}
|
|
|
97 |
</div>
|