| 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 forumreport_summary/filters
|
|
|
19 |
|
|
|
20 |
Summary report filters.
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"actionurl": "https://mymoodlesite.com/mod/forum/report/summary/index.php?courseid=2&forumid=2&perpage=50",
|
|
|
25 |
"hasgroups": true,
|
|
|
26 |
"filtergroupsname" : "Groups (all)",
|
|
|
27 |
"filtergroups": [
|
|
|
28 |
{
|
|
|
29 |
"groupid": "1",
|
|
|
30 |
"groupname": "Group A",
|
|
|
31 |
"checked": true
|
|
|
32 |
},
|
|
|
33 |
{
|
|
|
34 |
"groupid": "3",
|
|
|
35 |
"groupname": "Group C",
|
|
|
36 |
"checked": false
|
|
|
37 |
}
|
|
|
38 |
],
|
|
|
39 |
"filterdatesname": "Dates",
|
|
|
40 |
"filterdatesform": "<div>HTML for date filters</div>",
|
|
|
41 |
"filterdatesdata": [
|
|
|
42 |
{
|
|
|
43 |
"type": "from",
|
|
|
44 |
"timestamp": "510969600",
|
|
|
45 |
"enabled": "1"
|
|
|
46 |
},
|
|
|
47 |
{
|
|
|
48 |
"type": "to",
|
|
|
49 |
"timestamp": "725673600",
|
|
|
50 |
"enabled": "1"
|
|
|
51 |
}
|
|
|
52 |
],
|
|
|
53 |
"discussionids": [
|
|
|
54 |
{
|
|
|
55 |
"discid": 123
|
|
|
56 |
},
|
|
|
57 |
{
|
|
|
58 |
"discid": 456
|
|
|
59 |
}
|
|
|
60 |
]
|
|
|
61 |
}
|
|
|
62 |
}}
|
|
|
63 |
|
|
|
64 |
<div class="pb-4 pt-4" data-report-id="{{uniqid}}">
|
|
|
65 |
<form id="filtersform" name="filtersform" method="post" action="{{actionurl}}">
|
|
|
66 |
<input type="hidden" name="submitted" value="true">
|
|
|
67 |
|
|
|
68 |
<div id="filtersbuttons">
|
|
|
69 |
{{> forumreport_summary/filter_dates}}
|
|
|
70 |
{{> forumreport_summary/filter_groups}}
|
|
|
71 |
</div>
|
|
|
72 |
</form>
|
|
|
73 |
<form id="exportlinkform" name="exportlinkform" method="post" action="#">
|
|
|
74 |
{{#discussionids}}
|
|
|
75 |
<input type="hidden" name="discids[]" value="{{discid}}">
|
|
|
76 |
{{/discussionids}}
|
|
|
77 |
</form>
|
|
|
78 |
|
|
|
79 |
{{! Dates filter popover - mform must exist outside of the filtersform }}
|
|
|
80 |
{{> forumreport_summary/filter_dates_popover}}
|
|
|
81 |
</div>
|
|
|
82 |
|
|
|
83 |
{{#js}}
|
|
|
84 |
require(['forumreport_summary/filters'], function(Filters) {
|
|
|
85 |
Filters.init(document.querySelector("[data-report-id='{{uniqid}}']"));
|
|
|
86 |
});
|
|
|
87 |
{{/js}}
|