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 mod_h5pactivity/reportresults
19
 
20
    This template will render the report results inside a H5P activity.
21
 
22
    Variables required for this template:
23
    * attempts - Full attempts list
24
 
25
    Variables optional for this template:
26
    * title - optional selected attempt name
27
    * scored - The scored attempt
28
 
29
    Example context (json):
30
    {
31
        "attempt": {
32
            "id": 11,
33
            "h5pactivityid": 1,
34
            "userid": 3,
35
            "timecreated": 1587655101,
36
            "timemodified": 1587655101,
37
            "attempt": 2,
38
            "rawscore": 6,
39
            "maxscore": 6,
40
            "duration": "2 minutes 10 seconds",
41
            "completion": 1,
42
            "completionicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
43
            "success": 1,
44
            "successicon": "<i class=\"icon fa fa-check-circle fa-fw \"><\/i>",
45
            "scaled": 1,
46
            "reporturl": {},
47
            "score": "6 out of 6",
48
            "user": {
49
                "id": "3",
50
                "username": "s1",
51
                "idnumber": "",
52
                "firstname": "John",
53
                "lastname": "Doe",
54
                "email": "s1@example.com",
55
                "phone2": "",
56
                "institution": "Moodle HQ",
57
                "department": "Business",
58
                "picture": "[USERPIC]",
59
                "fullname": "John Doe"
60
            }
61
        },
62
        "results": [
63
            {
64
                "timecreated": "1587655101",
65
                "interactiontype": "other",
66
                "description": "Example of some results",
67
                "rawscore": "6",
68
                "maxscore": "6",
69
                "duration": "130",
70
                "completion": "1",
71
                "success": "1",
72
                "optionslabel": "Example result",
73
                "score": "6 out of 6",
74
                "content": "<p>See mod_h5pactivity result template for more examples.</p>"
75
            }
76
        ]
77
    }
78
 
79
}}
80
{{#attempt}}
81
    {{>mod_h5pactivity/attempt}}
82
{{/attempt}}
83
{{#results}}
84
    {{>mod_h5pactivity/result}}
85
{{/results}}