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 tool_lp/course_competencies_page
19
 
20
    Course competencies template.
21
 
22
    For a full list of the context for this template see the course_competencies_page renderable.
23
 
24
    This template includes ajax functionality, so it cannot be shown in the template library.
25
}}
26
<div data-region="coursecompetenciespage">
27
    <div data-region="actions" class="clearfix wrapper-fw my-3">
28
        <div class="float-sm-left">
29
            {{#canmanagecoursecompetencies}}
30
                <button class="btn btn-sm btn-primary" disabled>{{#str}}addcoursecompetencies, tool_lp{{/str}}</button>
31
            {{/canmanagecoursecompetencies}}
32
        </div>
33
    </div>
34
    <div data-region="configurecoursecompetencies" class="wrapper-fw">
35
    {{#cangradecompetencies}}
36
        <div class="alert alert-light my-3">
37
        {{#settings.pushratingstouserplans}}
38
            {{#str}}coursecompetencyratingsarepushedtouserplans, tool_lp{{/str}}
39
        {{/settings.pushratingstouserplans}}
40
        {{^settings.pushratingstouserplans}}
41
            {{#str}}coursecompetencyratingsarenotpushedtouserplans, tool_lp{{/str}}
42
        {{/settings.pushratingstouserplans}}
43
        {{#canconfigurecoursecompetencies}}
44
            <a href="#"
45
               data-action="configure-course-competency-settings"
46
               data-courseid="{{courseid}}"
47
               data-pushratingstouserplans="{{settings.pushratingstouserplans}}">
48
                {{#pix}}t/edit, core, {{#str}}edit{{/str}}{{/pix}}
49
            </a>
50
        {{/canconfigurecoursecompetencies}}
51
        </div>
52
    {{/cangradecompetencies}}
53
    </div>
54
{{#statistics}}
55
{{> tool_lp/course_competency_statistics }}
56
{{/statistics}}
57
 
58
<div data-region="coursecompetencies">
59
    <table class="generaltable fullwidth managecompetencies position-relative my-2">
60
        <tbody class="drag-parentnode">
61
        {{#competencies}}
62
            <tr class="drag-samenode position-relative" data-id="{{competency.id}}">
63
            <td class="position-relative">
64
                {{#canmanagecoursecompetencies}}
65
                <span class="drag-handlecontainer"></span>
66
                <div class="float-sm-right">
67
                    <a href="#" data-action="delete-competency-link" data-id="{{competency.id}}" class="btn btn-icon btn-danger">
68
                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
69
                            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6.75 7.75L7.59115 17.4233C7.68102 18.4568 8.54622 19.25 9.58363 19.25H14.4164C15.4538 19.25 16.319 18.4568 16.4088 17.4233L17.25 7.75"></path>
70
                            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9.75 7.5V6.75C9.75 5.64543 10.6454 4.75 11.75 4.75H12.25C13.3546 4.75 14.25 5.64543 14.25 6.75V7.5"></path>
71
                            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M5 7.75H19"></path>
72
                        </svg>
73
                    </a>
74
                </div>
75
                {{/canmanagecoursecompetencies}}
76
 
77
                <div class="bg-white p-4 border rounded">
78
                    {{#competency}}
79
                        <a href="{{pluginbaseurl}}/user_competency_in_course.php?courseid={{courseid}}&competencyid={{competency.id}}&userid={{gradableuserid}}"
80
                            id="competency-info-link-{{competency.id}}"
81
                            class="d-block mb-2"
82
                            title="{{#str}}viewdetails, tool_lp{{/str}}">
83
                            <div class="d-inline-flex"><strong class="py-1 mr-2">{{{competency.shortname}}}</strong><div class="badge badge-sq badge-xs badge-info">{{competency.idnumber}}</div></div>
84
                        </a>
85
                        <div>{{{competency.description}}}</div>
86
                    {{/competency}}
87
 
88
                    {{#comppath}}
89
                    <div class="d-inline-flex align-items-center my-2">
90
                        <span class="badge badge-light mr-2">{{#str}}path, tool_lp{{/str}}</span>
91
                        <span>{{> tool_lp/competency_path }}</span>
92
                    </div>
93
                    {{/comppath}}
94
                    {{#usercompetencycourse}}
95
                        {{#grade}}
96
                        <span class="badge {{#proficiency}}badge-success{{/proficiency}}{{^proficiency}}badge-danger{{/proficiency}}">{{gradename}}</span>
97
                        {{/grade}}
98
                    {{/usercompetencycourse}}
99
                    {{#canmanagecoursecompetencies}}
100
                    <div data-region="coursecompetency-ruleoutcome" class="my-3">
101
                        <label class="my-0">
102
                            <span class="mr-1">{{#str}}uponcoursecompletion, tool_lp{{/str}}</span>
103
                            <select data-field="ruleoutcome" data-id="{{coursecompetency.id}}" class="custom-select">
104
                            {{#ruleoutcomeoptions}}
105
                                <option value="{{value}}" {{#selected}}selected{{/selected}}>{{text}}</option>
106
                            {{/ruleoutcomeoptions}}
107
                            </select>
108
                        </label>
109
                    </div>
110
 
111
                    {{/canmanagecoursecompetencies}}
112
                    <div data-region="coursecompetencyactivities" class="my-3 pb-3 border-bottom">
113
                        <h6>{{#str}}activities{{/str}}</h6>
114
                        <ul class="inline list-inline mt-2 p-0">
115
                        {{#coursemodules}}
116
                            <li class="list-inline-item"><a href="{{url}}"><img src="{{iconurl}}"> {{name}} </a></li>
117
                        {{/coursemodules}}
118
                        {{^coursemodules}}
119
                            <li class="list-inline-item"><div class="badge badge-warning">{{#str}}noactivities, tool_lp{{/str}}</div></li>
120
                        {{/coursemodules}}
121
                        </ul>
122
                    </div>
123
 
124
                    <div data-region="learningplans">
125
 
126
                        <h6>{{#str}}userplans, core_competency{{/str}}</h6>
127
                        <ul class="inline list-inline mt-2 p-0">
128
                        {{#plans}}
129
                            <li class="list-inline-item"><a href="{{pluginbaseurl}}/plan.php?id={{id}}">{{{name}}}</a></li>
130
                        {{/plans}}
131
                        {{^plans}}
132
                            <li class="list-inline-item"><div class="badge badge-warning">{{#str}}nouserplanswithcompetency, core_competency{{/str}}</div></li>
133
                        {{/plans}}
134
                        </ul>
135
 
136
                    </div>
137
 
138
                </div>
139
            </td>
140
            </tr>
141
        {{/competencies}}
142
        </tbody>
143
    </table>
144
{{^competencies}}
145
<div class="badge badge-sq badge-danger my-3">
146
    {{#moduleid}}
147
        {{#str}}nocompetenciesinactivity, tool_lp{{/str}}
148
    {{/moduleid}}
149
    {{^moduleid}}
150
        {{#str}}nocompetenciesincourse, tool_lp{{/str}}
151
    {{/moduleid}}
152
</div>
153
{{/competencies}}
154
</div>
155
<div data-region="actions">
156
    {{#canmanagecompetencyframeworks}}
157
        <a class="btn btn-primary" href="{{manageurl}}">{{#str}}managecompetenciesandframeworks, tool_lp{{/str}}</a>
158
    {{/canmanagecompetencyframeworks}}
159
</div>
160
</div>
161
 
162
{{#js}}
163
require(['tool_lp/competencies'], function(mod) {
164
    (new mod({{courseid}}, 'course', {{pagecontextid}}));
165
});
166
{{/js}}
167
{{#canconfigurecoursecompetencies}}
168
{{#js}}
169
require(['tool_lp/course_competency_settings'], function(Mod) {
170
    (new Mod('[data-action=configure-course-competency-settings]'));
171
});
172
{{/js}}
173
{{/canconfigurecoursecompetencies}}