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/availability_info
19
 
20
    @deprecated since Moodle 3.9 MDL-68612 - Use core_courseformat\\output\\local\\content\\section\\availability instead
21
 
22
    Renders the availability info on the course outline page.
23
 
24
    Availability info can be displayed for activity modules or whole course
25
    sections. Activity modules can be either hidden from students, or available
26
    but not shown on course page (stealth), or the access can be restricted by
27
    configured conditions. Sections can be hidden.
28
 
29
    Classes required for JS:
30
    * none
31
 
32
    Data attributes required for JS:
33
    * none
34
 
35
    Context variables required for this template:
36
    * classes String list of CSS classes for the wrapping element
37
    * text HTML formatted text with the actual availability information
38
    * ishidden Boolean flag indiciating that the item is hidden from students
39
    * isstealth Boolean flag indicating that the item is in stealth mode
40
    * isrestricted Boolean flag indicating that restricted access conditions apply
41
    * isfullinfo Boolean flag indicating that the full list of restricted
42
      access conditions is displayed (aka teacher's view).
43
 
44
    Example context (json):
45
    {
46
        "classes": "",
47
        "text": "Not available unless: <ul><li>It is on or after <strong>8 June 2012</strong></li></ul>",
48
        "ishidden": 0,
49
        "isstealth": 0,
50
        "isrestricted": 1,
51
        "isfullinfo": 1
52
    }
53
}}
54
{{#text}}
55
<div class="rui-availabilityinfo {{classes}}">
56
    {{^isrestricted}}
57
    <div>
58
        <svg class="mr-2" width="24" height="24" fill="none" viewBox="0 0 24 24">
59
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18.6247 10C19.0646 10.8986 19.25 11.6745 19.25 12C19.25 13 17.5 18.25 12 18.25C11.2686 18.25 10.6035 18.1572 10 17.9938M7 16.2686C5.36209 14.6693 4.75 12.5914 4.75 12C4.75 11 6.5 5.75 12 5.75C13.7947 5.75 15.1901 6.30902 16.2558 7.09698"></path>
60
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.25 4.75L4.75 19.25"></path>
61
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.409 13.591C9.53033 12.7123 9.53033 11.2877 10.409 10.409C11.2877 9.5303 12.7123 9.5303 13.591 10.409"></path>
62
        </svg>
63
        <span>{{{text}}}</span>
64
    </div>
65
    {{/isrestricted}}
66
    {{#isrestricted}}
67
    <span class="d-inline-flex align-items-start w-100">
68
        <span title="{{#str}}restricted, core{{/str}}">
69
            <svg class="mr-2" width="24" height="24" fill="none" viewBox="0 0 24 24">
70
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.9522 16.3536L10.2152 5.85658C10.9531 4.38481 13.0539 4.3852 13.7913 5.85723L19.0495 16.3543C19.7156 17.6841 18.7487 19.25 17.2613 19.25H6.74007C5.25234 19.25 4.2854 17.6835 4.9522 16.3536Z"></path>
71
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10V12"></path>
72
                <circle cx="12" cy="16" r="1" fill="currentColor"></circle>
73
            </svg>
74
        </span>
75
        <span class="rui-availabilityinfo-text">{{{text}}}</span>
76
    </span>
77
    {{/isrestricted}}
78
</div>
79
{{/text}}