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_questionnaire/navbaruser
|
|
|
19 |
|
|
|
20 |
Template which defines a questionnaire user responses navigation bar for the report page.
|
|
|
21 |
|
|
|
22 |
Classes required for JS:
|
|
|
23 |
* /mod/questionnaire/module.js
|
|
|
24 |
|
|
|
25 |
Data attributes required for JS:
|
|
|
26 |
* none
|
|
|
27 |
|
|
|
28 |
Context variables required for this template:
|
|
|
29 |
* previous - object: "url" and "title" strings for previous link.
|
|
|
30 |
* prevrespnumbers - object: Array of "url"'s, "title"'s and response text ("respnumber") for each previous response link.
|
|
|
31 |
* currrespnumber - string: The current response number text.
|
|
|
32 |
* nextrespnumbers - object: Array of "url"'s, "title"'s and response text ("respnumber") for each next response link.
|
|
|
33 |
* next - object: "url" and "title" strings for "next" link.
|
|
|
34 |
|
|
|
35 |
Example context (json):
|
|
|
36 |
{
|
|
|
37 |
"previous": {
|
|
|
38 |
"url": "http://somelink.com",
|
|
|
39 |
"title": "Link title"
|
|
|
40 |
},
|
|
|
41 |
"prevrespnumbers": {
|
|
|
42 |
"url": "http://somelink.com",
|
|
|
43 |
"title": "Link title",
|
|
|
44 |
"respnumber": "3"
|
|
|
45 |
},
|
|
|
46 |
"currrespnumber": "4",
|
|
|
47 |
"nextrespnumbers": {
|
|
|
48 |
"url": "http://somelink.com",
|
|
|
49 |
"title": "Link title",
|
|
|
50 |
"respnumber": "5"
|
|
|
51 |
},
|
|
|
52 |
"next": {
|
|
|
53 |
"url": "http://somelink.com",
|
|
|
54 |
"title": "Link title"
|
|
|
55 |
}
|
|
|
56 |
}
|
|
|
57 |
}}
|
|
|
58 |
<div class="box respondentsnavbar">
|
|
|
59 |
{{#previous}}<a href="{{url}}" title="{{title}}">{{# str }}previous, moodle{{/ str }}</a> | {{/previous}}
|
|
|
60 |
{{#prevrespnumbers}}<a href="{{url}}" title="{{title}}">{{respnumber}}</a> | {{/prevrespnumbers}}
|
|
|
61 |
{{#currrespnumber}}<b>{{.}}</b>{{/currrespnumber}}
|
|
|
62 |
{{#nextrespnumbers}} | <a href="{{url}}" title="{{title}}">{{respnumber}}</a>{{/nextrespnumbers}}
|
|
|
63 |
{{#next}} | <a href="{{url}}" title="{{title}}">{{# str}}next, moodle{{/ str }}</a>{{/next}}
|
|
|
64 |
</div>
|