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 mod_forum/discussion_times
|
|
|
19 |
|
|
|
20 |
Template to display the discussion times. Note that this template is used only as a partial from within discussion_list, which
|
|
|
21 |
requires the language strings be passed through the cleanstr helper
|
|
|
22 |
|
|
|
23 |
Classes required for JS:
|
|
|
24 |
* none
|
|
|
25 |
|
|
|
26 |
Data attributes required for JS:
|
|
|
27 |
* none
|
|
|
28 |
|
|
|
29 |
Context variables required for this template:
|
|
|
30 |
* start int - The discussion start timestamp
|
|
|
31 |
* end int - The discussion end timestamp
|
|
|
32 |
* visible boolean - Whether the discussion is visible to students or not.
|
|
|
33 |
|
|
|
34 |
Example context (json):
|
|
|
35 |
{
|
|
|
36 |
"start": 1,
|
|
|
37 |
"end": 1,
|
|
|
38 |
"visible": true
|
|
|
39 |
}
|
|
|
40 |
}}
|
|
|
41 |
<ul>
|
|
|
42 |
{{#start}}
|
|
|
43 |
<li>
|
|
|
44 |
{{#cleanstr}} displaystartdate, mod_forum, {{#userdate}}{{.}}, {{#str}}strftimerecentfull {{/str}}{{/userdate}} {{/cleanstr}}
|
|
|
45 |
</li>
|
|
|
46 |
{{/start}}
|
|
|
47 |
{{#end}}
|
|
|
48 |
<li>
|
|
|
49 |
{{#cleanstr}} displayenddate, mod_forum, {{#userdate}}{{.}}, {{#str}}strftimerecentfull {{/str}}{{/userdate}} {{/cleanstr}}
|
|
|
50 |
</li>
|
|
|
51 |
{{/end}}
|
|
|
52 |
<li>
|
|
|
53 |
{{#visible}}
|
|
|
54 |
{{#cleanstr}} timedvisible, mod_forum {{/cleanstr}}
|
|
|
55 |
{{/visible}}
|
|
|
56 |
{{^visible}}
|
|
|
57 |
{{#cleanstr}} timedhidden, mod_forum {{/cleanstr}}
|
|
|
58 |
{{/visible}}
|
|
|
59 |
</li>
|
|
|
60 |
</ul>
|