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/section/availability
19
 
20
    Displays a section availability.
21
 
22
    The 3.x version course edition requires an existing section_availability div.
23
 
24
    Example context (json):
25
    {
26
        "info": [
27
            {
28
                "text": "Not available unless: <ul><li>It is on or after <strong>8 June 2012</strong></li></ul>",
29
                "isrestricted": 1,
30
                "isfullinfo": 1
31
            }
32
        ],
33
        "hasavailability": true
34
    }
35
}}
36
{{#hasavailability}}
37
<div class="rui-availabilityinfo section_availability course-description-item my-2">
38
    {{#info}}
39
        <div class="availabilityinfo small {{classes}}" data-region="availabilityinfo">
40
        {{^isrestricted}}
41
            <span class="badge badge-sm badge-warning">{{{text}}}</span>
42
        {{/isrestricted}}
43
        {{#isrestricted}}
44
            <div class="description-inner">
45
                <svg class="mr-1" width="24" height="24" fill="none" viewBox="0 0 24 24">
46
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M5.75 11.75C5.75 11.1977 6.19772 10.75 6.75 10.75H17.25C17.8023 10.75 18.25 11.1977 18.25 11.75V17.25C18.25 18.3546 17.3546 19.25 16.25 19.25H7.75C6.64543 19.25 5.75 18.3546 5.75 17.25V11.75Z"></path>
47
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7.75 10.5V10.3427C7.75 8.78147 7.65607 7.04125 8.74646 5.9239C9.36829 5.2867 10.3745 4.75 12 4.75C13.6255 4.75 14.6317 5.2867 15.2535 5.9239C16.3439 7.04125 16.25 8.78147 16.25 10.3427V10.5"></path>
48
                </svg>
49
                <span>{{{text}}}</span>
50
            </div>
51
        {{/isrestricted}}
52
        </div>
53
    {{/info}}
54
</div>
55
{{/hasavailability}}