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 block_myoverview/view-summary
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
                "summary": "This course is about assignments",
31
                "hasprogress": true,
32
                "progress": 10,
33
                "coursecategory": "Category 1",
34
                "visible": true
35
            }
36
        ]
37
    }
38
}}
39
<div role="list">
40
{{#courses}}
820 ariadna 41
 
1 efrain 42
    <div class="course-summaryitem list-group-item course-listitem border-left-0 border-right-0 border-top-0 px-2 rounded-0" role="listitem"
43
        data-region="course-content"
44
        data-course-id="{{{id}}}">
45
        <div class="row">
46
            <div class="col-md-2 d-flex align-items-center mb-sm-3 mb-md-0">
47
                <a href="{{viewurl}}" tabindex="-1" class="mw-100 w-100">
48
                    <div class="summary-image rounded mw-100" style='background-image: url("{{{courseimage}}}");'>
49
                        <span class="sr-only">{{fullname}}</span>
50
                    </div>
51
                </a>
52
            </div>
53
            <div class="col-md-9 d-flex flex-column">
54
                {{#showshortname}}
55
                    <div class="text-muted muted d-flex flex-wrap">
56
                        {{#showcoursecategory}}
57
                            <div class="pl-1 pr-1">|</div>
58
                        {{/showcoursecategory}}
59
                        <span class="sr-only">
60
                            {{#str}}aria:courseshortname, core_course{{/str}}
61
                        </span>
62
                        <div>{{{shortname}}}</div>
63
                    </div>
64
                {{/showshortname}}
65
                <a href="{{viewurl}}" class="aalink coursename">
66
                    {{> core_course/favouriteicon }}
67
                    <span class="sr-only">
68
                        {{#str}}aria:coursename, core_course{{/str}}
69
                    </span>
70
                    {{{fullname}}}
71
                </a>
72
                {{$coursecategory}}
73
                    <span class="sr-only">
74
                        {{#str}}aria:coursecategory, core_course{{/str}}
75
                    </span>
76
                    {{#showcoursecategory}}
77
                        <span class="categoryname">
78
                            {{#coursecategory}}
79
                                {{{coursecategory}}}
80
                            {{/coursecategory}}
81
                        </span>
82
                    {{/showcoursecategory}}
83
                {{/coursecategory}}
84
                {{^visible}}
85
                    <div class="d-flex flex-wrap">
86
                        <span class="badge bg-info text-white">{{#str}} hiddenfromstudents {{/str}}</span>
87
                    </div>
88
                {{/visible}}
89
                <div class="summary">
90
                    <span class="sr-only">{{#str}}aria:coursesummary, block_myoverview{{/str}}</span>
91
                    {{{summary}}}
92
                </div>
93
                {{#hasprogress}}
94
                    <div class="text-muted muted d-flex flex-wrap mt-auto">
95
                        {{> block_myoverview/progress-bar}}
96
                    </div>
97
                {{/hasprogress}}
98
            </div>
99
            <div class="col-md-1 p-0 d-flex menu">
100
                {{> block_myoverview/course-action-menu }}
101
            </div>
102
        </div>
103
    </div>
104
{{/courses}}
105
</div>