weekly release 4.1dev
[moodle.git] / mod / forum / templates / local / grades / view_grade.mustache
CommitLineData
07d8669d
MM
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/local/grades/local/view_grade
19
20 Classes required for JS:
21 * none
22
23 Data attributes required for JS:
24 * data-region="grade-template"
25
26 Context variables required for this template:
27 * none
28
29 Example context (json):
30 {
31 "templatename": "core_grades/grades/grader/gradingpanel/point",
32 "grade": {
33 "usergrade": 55,
34 "maxgrade": 100,
35 "timemodified": 1573543598
36 },
37 "hasgrade": true
38 }
39}}
40<div class="container-fluid grade-display" data-region="view-grade">
41 {{#grade}}
4394f9e3 42 <div class="row px-3">
4cbde3c9 43 <h5 class="font-weight-bold description">{{#str}}gradenoun{{/str}}:</h5>
2621d367 44 <p class="ml-auto">{{usergrade}}</p>
07d8669d 45 </div>
4394f9e3 46 <div class="row px-3">
97ba6091
MM
47 <h5 class="font-weight-bold description">{{#str}}gradedby, forum{{/str}}:</h5>
48 <p class="ml-auto">
49 {{#gradedby}}
50 {{gradedby}}
51 {{/gradedby}}
52 {{^gradedby}}
53 -
54 {{/gradedby}}
55 </p>
56 </div>
4394f9e3 57 <div class="row px-3">
07d8669d
MM
58 <h5 class="font-weight-bold description">{{#str}}date{{/str}}:</h5>
59 <p class="ml-auto">{{#userdate}}{{timemodified}}, {{#str}} strftimedate, langconfig {{/str}}{{/userdate}}</p>
60 </div>
61 {{/grade}}
4394f9e3 62 <div class="row px-3">
07d8669d
MM
63 <h5 class="font-weight-bold description">
64 {{#str}}gradingstatus, forum{{/str}}
65 </h5>
66 <p class="ml-auto">
67 {{#hasgrade}}
68 {{#str}}graded, forum{{/str}}
69 {{/hasgrade}}
70 {{^hasgrade}}
71 {{#str}}notgraded, forum{{/str}}
72 {{/hasgrade}}
73 </p>
74 </div>
4394f9e3 75 <div class="row p-3">
07d8669d
MM
76 <fieldset class="w-100" disabled="disabled">
77 <div class="w-100" data-region="grade-template"></div>
78 </fieldset>
79 </div>
80</div>