Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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 report_insights/insight_details
19
 
20
    Actions panel at the bottom of the assignment grading UI.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Data attributes required for JS:
26
    * none
27
 
28
    Context variables required for this template:
29
    * none
30
 
31
    Example context (json):
32
    {
33
        "contextid": 123,
34
        "modelid": 321,
35
        "insightname": "Best insight ever",
36
        "timecreated": "Thursday, 5 October 2017, 4:16 PM",
37
        "timerange": "Monday, 4 September 2017, 6:00 PM to Thursday, 5 October 2017, 12:00 AM",
38
        "sampleimage": "<a href=\"#\">Link</a>",
39
        "sampledescription": "Sample description",
40
        "actions": [
41
            {
42
                "classes": "",
43
                "primary": {
44
                    "items": [{"rawhtml": "<p>View details</p>"}]
45
                },
46
                "secondary": {
47
                    "items": [{"rawhtml": "<p>Not useful</p>"}]
48
                }
49
            }
50
        ],
51
        "style": "success",
52
        "outcomeicon": {
53
            "attributes": [
54
                {"name": "src", "value": "https://moodle.org/logo/moodle-logo.svg" }
55
            ]
56
        },
57
        "predictiondisplayvalue": "This dev will understand it",
58
        "calculations": [
59
            {
60
                "style": "success",
61
                "outcomeicon": {
62
                    "attributes": [
63
                        {"name": "src", "value": "https://moodle.org/logo/moodle-logo.svg" }
64
                    ]
65
                },
66
                "name": "Indicator 1",
67
                "displayvalue": "yes"
68
            }, {
69
                "style": "info",
70
                "name": "Indicator 2",
71
                "displayvalue": "20%"
72
            }, {
73
                "style": "",
74
                "name": "Indicator 2",
75
                "displayvalue": "20%"
76
            }, {
77
                "style": "warning",
78
                "name": "Indicator 2",
79
                "displayvalue": "20%"
80
            }, {
81
                "style": "danger",
82
                "name": "Indicator 2",
83
                "displayvalue": "20%"
84
            }
85
        ]
86
    }
87
}}
88
 
89
<div class="insight-container" data-context-id="{{contextid}}" data-model-id="{{modelid}}">
90
 
91
    <h2 class="mb-2">{{insightname}}</h2>
92
 
93
    {{{insightdescription}}}
94
 
95
    {{> report_insights/bulk_actions }}
96
 
97
    <table class="generaltable insights-list mt-3">
98
        {{#showpredictionheading}}
99
            <caption>
100
                {{#str}}prediction, report_insights{{/str}}:
101
                <span class="{{#style}}table-{{style}}{{/style}}">
102
                    {{#outcomeicon}}
103
                        {{> core/pix_icon}}
104
                    {{/outcomeicon}}
105
                    {{predictiondisplayvalue}}
106
                </span>
107
            </caption>
108
        {{/showpredictionheading}}
109
        <thead>
110
            <tr class="d-flex">
111
                <th scope="col" class="col-1{{^bulkactions}} hidden{{/bulkactions}}">{{{hiddencheckboxtoggleall}}}</th>
112
                <th scope="col" class="col-8">{{#str}}description{{/str}}</th>
113
                <th scope="col" class="col-3{{^actions}} hidden{{/actions}}">{{#str}}actions{{/str}}</th>
114
            </tr>
115
        </thead>
116
        <tbody>
117
            {{> report_insights/insight}}
118
        </tbody>
119
    </table>
120
 
121
    <table class="generaltable prediction-timedetails">
122
        <caption>{{#str}}predictiondetails, report_insights{{/str}}</caption>
123
        <tbody>
124
            <tr>
125
                <th scope="row">{{#str}}timecreated, report_insights{{/str}}</td>
126
                <td>{{timecreated}}</td>
127
            </tr>
128
            {{#timerange}}
129
                <tr>
130
                    <th scope="row">{{#str}}timerange, report_insights{{/str}}</td>
131
                    <td>{{.}}</td>
132
                </tr>
133
            {{/timerange}}
134
        </tbody>
135
    </table>
136
    <table class="generaltable prediction-calculations">
137
        <caption>{{#str}}indicators, report_insights{{/str}}</caption>
138
        <tbody>
139
        {{#calculations}}
140
            <tr>
141
                <th scope="row" class="{{#style}}table-{{style}}{{/style}}">{{name}}</td>
142
                <td class="{{#style}}table-{{style}}{{/style}}">{{#outcomeicon}}{{> core/pix_icon}}{{/outcomeicon}} {{displayvalue}} {{#outcomehelp}}{{> core/help_icon}}{{/outcomehelp}}</td>
143
            </tr>
144
        {{/calculations}}
145
        </tbody>
146
    </table>
147
    {{#nocalculations}}
148
        {{> core/notification_info}}
149
    {{/nocalculations}}
150
 
151
</div>