| 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_reportbuilder/report
|
|
|
19 |
|
|
|
20 |
Template for a report
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"id": 1,
|
|
|
25 |
"contextid": 1,
|
|
|
26 |
"type": 1,
|
|
|
27 |
"parameters": [],
|
|
|
28 |
"attributes": [{
|
|
|
29 |
"name": "data-custom",
|
|
|
30 |
"value": "1"
|
|
|
31 |
}],
|
|
|
32 |
"table": "table",
|
|
|
33 |
"filterspresent": true,
|
|
|
34 |
"filtersform": "form"
|
|
|
35 |
}
|
|
|
36 |
}}
|
|
|
37 |
<div class="reportbuilder-report {{classes}}"
|
|
|
38 |
data-region="core_reportbuilder/report"
|
|
|
39 |
data-report-id="{{id}}"
|
|
|
40 |
data-report-type="{{type}}"
|
|
|
41 |
data-parameter="{{parameters}}"
|
|
|
42 |
{{#attributes}}{{name}}="{{value}}" {{/attributes}}>
|
|
|
43 |
<div class="reportbuilder-wrapper">
|
|
|
44 |
{{#filterspresent}}
|
|
|
45 |
<div class="dropdown d-flex justify-content-end">
|
|
|
46 |
{{>core_reportbuilder/local/filters/area}}
|
|
|
47 |
</div>
|
|
|
48 |
{{/filterspresent}}
|
|
|
49 |
{{! Table }}
|
|
|
50 |
<div class="mt-2">
|
|
|
51 |
{{{table}}}
|
|
|
52 |
</div>
|
|
|
53 |
</div>
|
|
|
54 |
</div>
|
|
|
55 |
|
|
|
56 |
{{#js}}
|
|
|
57 |
require(['core_reportbuilder/report'], function(report) {
|
|
|
58 |
report.init();
|
|
|
59 |
});
|
|
|
60 |
{{/js}}
|