Proyectos de Subversion Moodle

Rev

Rev 368 | | Comparar con el anterior | 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 core/activity_header
19
 
20
    Activity header template.
21
 
22
    Context variables required for this template:
23
    * title - The title of the activity module
24
    * description - The intro for the module
25
    * completion - The completion info if available for the the module as acquired via the activity_information method
26
    * additional_items - Any additional URL select navigation that needs to show up in the header
27
 
28
    Example context (json):
29
    {
30
        "title": "Assignment 1",
31
        "description": "The assignment does something",
32
        "completion": "<div class='activitycompletion'>Some activity completion criteria</div>",
33
        "additional_items": {
34
            "id": "url_select_test",
35
            "action": "https://example.com/post",
36
            "formid": "url_select_form",
37
            "sesskey": "sesskey",
38
            "label": "core/url_select",
39
            "helpicon": {
40
                "title": "Help with something",
41
                "text": "Help with something",
42
                "url": "http://example.org/help",
43
                "linktext": "",
44
                "icon":{
45
                    "extraclasses": "iconhelp",
46
                    "attributes": [
47
                        {"name": "src", "value": "../../../pix/help.svg"},
48
                        {"name": "alt", "value": "Help icon"}
49
                    ]
50
                }
51
            },
52
            "showbutton": "Go",
53
            "options": [{
54
                "name": "Group 1", "isgroup": true, "options":
55
                [
56
                    {"name": "Item 1", "isgroup": false, "value": "1"},
57
                    {"name": "Item 2", "isgroup": false, "value": "2"}
58
                ]},
59
                {"name": "Group 2", "isgroup": true, "options":
60
                [
61
                    {"name": "Item 3", "isgroup": false, "value": "3"},
62
                    {"name": "Item 4", "isgroup": false, "value": "4"}
63
                ]}],
64
            "disabled": false,
65
            "title": "Some cool title"
66
        }
67
    }
68
}}
69
<span id="maincontent"></span>
331 ariadna 70
<div class="activity-header" data-for="page-activity-header">
369 ariadna 71
    {{#completion}}
72
        <span class="sr-only">{{#str}} overallaggregation, completion {{/str}}</span>
73
        {{{completion}}}
74
    {{/completion}}{{!
1 efrain 75
}}</div>