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 course_course/coursecard
19
 
20
    This template renders the a card for the course cards.
21
 
22
    Example context (json):
23
    {
24
        "courses": [
25
            {
26
                "name": "Assignment due 1",
27
                "viewurl": "https://moodlesite/course/view.php?id=2",
28
                "courseimage": "https://moodlesite/pluginfile/123/course/overviewfiles/123.jpg",
29
                "fullname": "course 3",
30
                "hasprogress": true,
31
                "progress": 10,
32
                "visible": true
33
            }
34
        ]
35
    }
36
}}
1159 ariadna 37
 
38
<div class="col-12 col-sm-12 col-md-3">
39
    <div class="rui-course-card {{#progress}}rui-progress-{{progress}}{{/progress}} {{#showcoursecategory}}rui-course-card--cat{{/showcoursecategory}}" role="listitem"
1 efrain 40
    data-region="course-content"
41
    data-course-id="{{{id}}}">
42
 
1159 ariadna 43
        <div class="rui-course-card-icons">
44
            {{> core_course/favouriteicon }}
45
        </div>
1 efrain 46
 
1159 ariadna 47
        {{$menu}}{{/menu}}
48
 
49
        <a href="{{viewurl}}" tabindex="-1" title="{{#str}}courseoverviewfiles, moodle {{/str}}">
50
            <figure class="rui-course-card-img-top" style="background-image: url('{{{courseimage}}}');"></figure>
51
        </a>
1 efrain 52
 
1159 ariadna 53
        <div class="rui-course-card-margin mt-3 d-flex align-items-start">
54
            <div class="w-100">
55
                <div class="rui-course-cat d-flex align-self-end mb-1">
56
                    <div class="rui-course-cat-badge"><span class="text-truncate">{{$coursecategory}}{{/coursecategory}}</span></div>
57
                </div>
58
                {{#showshortname}}
59
                <div class="rui-course-card-shortname flex-wrap">
60
                    <span class="sr-only">
61
                        {{#str}}aria:courseshortname, core_course{{/str}}
62
                    </span>
63
                    <h5>
64
                        {{{shortname}}}
65
                    </h5>
66
                </div>
67
                {{/showshortname}}
68
                <h4 class="rui-course-card-title mb-1 w-100">
69
                    <a href="{{viewurl}}">
70
                        <span class="sr-only">{{#str}}aria:coursename, core_course{{/str}}</span>
71
                        {{$coursename}}{{/coursename}}
72
                    </a>
73
                </h4>
1 efrain 74
            </div>
75
        </div>
76
 
1159 ariadna 77
        {{^visible}}
1 efrain 78
 
1159 ariadna 79
        <div class="rui-course-card-margin mt-2 d-inline-flex flex-wrap mb-0 align-self-start">
80
            <span class="rui-course-hidden-badge">
81
                <svg width="15" height="15" fill="none" viewBox="0 0 24 24">
82
                    <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>
83
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.25 4.75L4.75 19.25"></path>
84
                    <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>
85
                </svg>
86
                {{#str}} hiddenfromstudents {{/str}}
87
            </span>
88
        </div>
89
 
90
        {{/visible}}
91
 
92
        <div class="mt-auto">{{$progress}}{{/progress}}</div>
93
    </div>
1 efrain 94
</div>