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 core_courseformat/local/content/availability
19
 
20
    Displays the availability contents with excerpt version if needed.
21
 
22
    Example context (json):
23
    {
24
        "text": "Not available unless: <ul><li>It is on or after <strong>8 June 2012</strong></li><li>You achieve higher than a certain score in <strong>Course total</strong></li></ul>",
25
        "excerpt": "Not available unless: It is on or after <strong>8 June 2012</strong>",
26
        "editing": true,
27
        "editurl": "/course/editsection.php?id=81&showonly=availabilityconditions"
28
    }
29
}}
30
{{^excerpt}}
31
    <div{{#editing}} class="mt-2"{{/editing}}>
32
        {{#pix}}t/unlock, core{{/pix}} {{{text}}}
33
    </div>
34
{{/excerpt}}
35
{{#excerpt}}
36
    {{< core/showmore }}
37
        {{$collapsedcontent}}
38
            {{#pix}}t/unlock, core{{/pix}} <span class="availability-excerpt"> {{{excerpt}}} ... </span>
39
        {{/collapsedcontent}}
40
        {{$expandedcontent}}
41
            {{#pix}}t/unlock, core{{/pix}} {{{text}}}
42
        {{/expandedcontent}}
43
        {{$buttonextraclasses}}font-weight-bold{{/buttonextraclasses}}
44
        {{$collapsedextraclasses}}text-truncate pr-2 {{#editing}}mt-2{{/editing}}{{/collapsedextraclasses}}
45
        {{$expandedextraclasses}}
46
            {{^editing}}py-2{{/editing}}
47
            {{#editing}}mt-2 pb-2{{/editing}}
48
        {{/expandedextraclasses}}
49
    {{/core/showmore }}
50
{{/excerpt}}
51
{{#editing}}
52
    {{#editurl}}
53
        <div class="editavailability border-top mt-2 py-2">
54
            <a href="{{editurl}}" class="btn btn-sm btn-secondary w-100">{{#pix}} i/edit, core {{/pix}}{{#str}}editsettings, availability{{/str}}</a>
55
        </div>
56
    {{/editurl}}
57
{{/editing}}