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 block_myoverview/view-list
19
 
20
    This template renders the list view for the myoverview block.
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
                "coursecategory": "Category 1",
33
                "visible": true
34
            }
35
        ]
36
    }
37
}}
38
 
39
<ul class="list-group mt-2 mx-0">
40
    {{#courses}}
41
        <li class="list-group-item rui-course-listitem p-0 rui-progress-{{progress}} {{#showcoursecategory}}rui-course-listitem--cat{{/showcoursecategory}}" data-region="course-content" data-course-id="{{{id}}}">
42
            <div class="rui-course-list-body">
43
                <div class="rui-myoverview-action-menu">
44
                    {{> block_myoverview/course-action-menu }}
45
                </div>
46
 
47
                <div class="d-flex flex-wrap">
48
                    <a href="{{viewurl}}" tabindex="-1" title="{{#str}}courseoverviewfiles, moodle{{/str}}">
49
                        {{> core_course/favouriteicon }}
50
                        <figure class="rui-course-listitem-img" style="background-image: url('{{{courseimage}}}');"></figure>
51
                    </a>
52
                    <div class="d-flex col flex-wrap">
53
                        <div>
54
                            {{#showshortname}}
55
                                <div class="d-block mt-3 mb-1">
56
                                    <span class="sr-only">
57
                                        {{#str}}aria:courseshortname, core_course{{/str}}
58
                                    </span>
59
                                    <h5>{{{shortname}}}</h5>
60
                                </div>
61
                            {{/showshortname}}
62
 
63
                            <h4 class="d-block rui-course-card-title {{^showshortname}}mt-3{{/showshortname}} mb-1">
64
                                <a href="{{viewurl}}" class="d-inline-flex align-items-center">
65
                                    <span class="sr-only">
66
                                        {{#str}}aria:coursename, core_course{{/str}}
67
                                    </span>
68
                                    {{{fullname}}}
69
                                </a>
70
                            </h4>
71
                            {{^visible}}
72
                                <div class="d-inline-flex flex-wrap">
73
                                    <span class="rui-course-hidden-badge">
74
                                        <svg class="mr-1" width="16" height="16" fill="none" viewBox="0 0 24 24">
75
                                            <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>
76
                                            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.25 4.75L4.75 19.25"></path>
77
                                            <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>
78
                                        </svg>
79
                                        {{#str}} hiddenfromstudents {{/str}}
80
                                    </span>
81
                                </div>
82
                            {{/visible}}
83
                        </div>
84
 
85
                        {{#showcoursecategory}}
86
                            <div class="w-100 rui-course-cat-badge mt-2 mb-2">
87
                                <span class="sr-only">
88
                                    {{#str}}aria:coursecategory, core_course{{/str}}
89
                                </span>
90
                                {{{coursecategory}}}
91
                            </div>
92
                        {{/showcoursecategory}}
93
                        {{#hasprogress}}
94
                            <div class="rui-course-card-progress-bar p-0 w-100">
95
                                {{> block_myoverview/progress-bar}}
96
                            </div>
97
                        {{/hasprogress}}
98
                    </div>
99
                </div>
100
            </div>
101
 
102
        </li>
103
    {{/courses}}
104
</ul>