Proyectos de Subversion Moodle

Rev

Rev 1 | | 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_courseformat/local/content/section/cmlist
19
 
20
    Displays the course module list inside a course section.
21
 
1441 ariadna 22
    TODO remove showmovehere, strmovefull, movingstr, cancelcopyurl, movetosectionurl,
23
    strmovefull and all associated HTML as part of MDL-83530.
24
 
1 efrain 25
    Example context (json):
26
    {
27
        "cms": [
28
            {
29
                "cmitem": {
30
                    "cmformat": {
31
                        "cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Forum example</span></a>",
32
                        "hasname": "true"
33
                    },
34
                    "id": 3,
35
                    "module": "forum",
1441 ariadna 36
                    "anchor": "module-3",
1 efrain 37
                    "extraclasses": "newmessages"
38
                }
39
            },
40
            {
41
                "cmitem": {
42
                    "cmformat": {
43
                        "cmname": "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Assign example</span></a>",
44
                        "hasname": "true"
45
                    },
46
                    "id": 4,
47
                    "module": "assign",
1441 ariadna 48
                    "anchor": "module-4",
1 efrain 49
                    "extraclasses": ""
50
                }
51
            }
52
        ],
53
        "hascms": true,
54
        "showmovehere": true,
55
        "movingstr": "Moving this activity: folder example",
56
        "cancelcopyurl": "#",
57
        "movetosectionurl": "#",
58
        "strmovefull": "Move 'folder example' to this location"
59
    }
60
}}
61
{{#showmovehere}}
62
<p>{{movingstr}} (<a href="{{{cancelcopyurl}}}">{{#str}} cancel {{/str}}</a>)</p>
63
{{/showmovehere}}
64
<ul class="section m-0 p-0 img-text {{#hascms}} d-block {{/hascms}}" data-for="cmlist">
65
{{#cms}}
66
    {{#showmovehere}}
67
    <li class="movehere">
68
        <a href="{{{moveurl}}}" title="{{strmovefull}}" class="movehere"></a>
69
    </li>
70
    {{/showmovehere}}
71
    {{#cmitem}}
72
        {{$ core_courseformat/local/content/section/cmitem}}
73
            {{> core_courseformat/local/content/section/cmitem}}
74
        {{/ core_courseformat/local/content/section/cmitem}}
75
    {{/cmitem}}
76
{{/cms}}
77
{{#showmovehere}}
78
    <li class="movehere">
79
        <a href="{{{movetosectionurl}}}" title="{{strmovefull}}" class="movehere"></a>
80
    </li>
81
{{/showmovehere}}
82
    </ul>