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 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.
1441 ariadna 25
 
26
    Example context (json):
27
    {
28
        "canmanagecoursecompetencies": true,
29
        "cangradecompetencies": true,
30
        "settings": {
31
            "pushratingstouserplans": true
32
        },
33
        "canconfigurecoursecompetencies": true,
34
        "competencies": [{
35
            "competency": {
36
                "id": 2,
37
                "shortname": "Competency1",
38
                "idnumber": "COMP1",
39
                "description": "Competency1 description"
40
            },
41
            "coursecompetency": {
42
                "id": 1
43
            },
44
            "ruleoutcomeoptions": [{
45
                "value": "1",
46
                "text": "Mark as complete"
47
            }, {
48
                "value": "2",
49
                "text": "Mark as complete and request review"
50
            }]
51
        }]
52
    }
1 efrain 53
}}
54
<div data-region="coursecompetenciespage">
55
    <div data-region="actions" class="clearfix">
1441 ariadna 56
        <div class="float-sm-start">
1 efrain 57
            {{#canmanagecoursecompetencies}}
58
                <button class="btn btn-secondary" disabled>{{#str}}addcoursecompetencies, tool_lp{{/str}}</button>
59
            {{/canmanagecoursecompetencies}}
60
        </div>
61
    </div>
62
    <div data-region="configurecoursecompetencies">
63
    {{#cangradecompetencies}}
64
        <p class="alert {{^settings.pushratingstouserplans}}alert-info{{/settings.pushratingstouserplans}}">
65
        {{#settings.pushratingstouserplans}}
66
            {{#str}}coursecompetencyratingsarepushedtouserplans, tool_lp{{/str}}
67
        {{/settings.pushratingstouserplans}}
68
        {{^settings.pushratingstouserplans}}
69
            {{#str}}coursecompetencyratingsarenotpushedtouserplans, tool_lp{{/str}}
70
        {{/settings.pushratingstouserplans}}
71
        {{#canconfigurecoursecompetencies}}
72
            <a href="#"
73
               data-action="configure-course-competency-settings"
74
               data-courseid="{{courseid}}"
75
               data-pushratingstouserplans="{{settings.pushratingstouserplans}}">
1441 ariadna 76
                {{#pix}}i/settings, core, {{#str}}edit{{/str}}{{/pix}}
1 efrain 77
            </a>
78
        {{/canconfigurecoursecompetencies}}
79
        </p>
80
    {{/cangradecompetencies}}
81
    </div>
82
{{#statistics}}
83
{{> tool_lp/course_competency_statistics }}
84
{{/statistics}}
85
<div data-region="coursecompetencies">
86
<table class="generaltable fullwidth managecompetencies">
87
<tbody class="drag-parentnode">
88
{{#competencies}}
89
    <tr class="drag-samenode" data-id="{{competency.id}}">
90
    <td>
91
        {{#canmanagecoursecompetencies}}
1441 ariadna 92
        <span class="drag-handlecontainer float-sm-start"></span>
93
        <div class="float-sm-end">
1 efrain 94
            <a href="#" data-action="delete-competency-link" data-id="{{competency.id}}">
95
                {{#pix}}t/delete, core, {{#str}}delete{{/str}}{{/pix}}
96
            </a>
97
        </div>
98
        <div class="clearfix"></div>
99
        {{/canmanagecoursecompetencies}}
100
        {{#competency}}
101
            <a href="{{pluginbaseurl}}/user_competency_in_course.php?courseid={{courseid}}&competencyid={{competency.id}}&userid={{gradableuserid}}"
102
                   id="competency-info-link-{{competency.id}}"
103
                   title="{{#str}}viewdetails, tool_lp{{/str}}">
104
                <p><strong>{{{competency.shortname}}} <em>{{competency.idnumber}}</em></strong></p>
105
            </a>
106
            <p>{{{competency.description}}}</p>
107
        {{/competency}}
108
        {{#comppath}}
1441 ariadna 109
            <span class="float-sm-start">{{#str}}path, tool_lp{{/str}}&nbsp;</span>{{> tool_lp/competency_path }}
1 efrain 110
        {{/comppath}}
111
        {{#usercompetencycourse}}
112
            {{#grade}}
113
            <span class="badge {{#proficiency}}bg-success{{/proficiency}}{{^proficiency}}bg-danger{{/proficiency}} text-white">{{gradename}}</span>
114
            {{/grade}}
115
        {{/usercompetencycourse}}
116
        {{#canmanagecoursecompetencies}}
117
        <div data-region="coursecompetency-ruleoutcome">
118
            <label>
119
                {{#str}}uponcoursecompletion, tool_lp{{/str}}
1441 ariadna 120
                <select data-field="ruleoutcome" data-id="{{coursecompetency.id}}" class="form-select">
1 efrain 121
                  {{#ruleoutcomeoptions}}
122
                     <option value="{{value}}" {{#selected}}selected{{/selected}}>{{text}}</option>
123
                  {{/ruleoutcomeoptions}}
124
                </select>
125
            </label>
126
        </div>
127
        {{/canmanagecoursecompetencies}}
128
        <div data-region="coursecompetencyactivities">
129
        <p>
130
        <strong>{{#str}}activities{{/str}}</strong>
131
        <ul class="inline list-inline p-2">
132
        {{#coursemodules}}
133
            <li class="list-inline-item"><a href="{{url}}"><img class="icon" src="{{iconurl}}"> {{name}} </a></li>
134
        {{/coursemodules}}
135
        {{^coursemodules}}
136
            <li class="list-inline-item">{{#str}}noactivities, tool_lp{{/str}}</li>
137
        {{/coursemodules}}
138
        </ul>
139
        </p>
140
        </div>
141
        <div data-region="learningplans">
142
        <p>
143
        <strong>{{#str}}userplans, core_competency{{/str}}</strong>
144
        <ul class="inline list-inline p-2">
145
        {{#plans}}
146
            <li class="list-inline-item"><a href="{{pluginbaseurl}}/plan.php?id={{id}}">{{{name}}}</a></li>
147
        {{/plans}}
148
        {{^plans}}
149
            <li class="list-inline-item">{{#str}}nouserplanswithcompetency, core_competency{{/str}}</li>
150
        {{/plans}}
151
        </ul>
152
        </p>
153
        </div>
154
    </td>
155
    </tr>
156
{{/competencies}}
157
</tbody>
158
</table>
159
{{^competencies}}
160
<p class="alert alert-info">
161
    {{#moduleid}}
162
        {{#str}}nocompetenciesinactivity, tool_lp{{/str}}
163
    {{/moduleid}}
164
    {{^moduleid}}
165
        {{#str}}nocompetenciesincourse, tool_lp{{/str}}
166
    {{/moduleid}}
167
</p>
168
{{/competencies}}
169
</div>
170
<div data-region="actions">
171
    {{#canmanagecompetencyframeworks}}
172
        <p><a href="{{manageurl}}">{{#str}}managecompetenciesandframeworks, tool_lp{{/str}}</a></p>
173
    {{/canmanagecompetencyframeworks}}
174
</div>
175
</div>
176
{{#js}}
177
require(['tool_lp/competencies'], function(mod) {
178
    (new mod({{courseid}}, 'course', {{pagecontextid}}));
179
});
180
{{/js}}
181
{{#canconfigurecoursecompetencies}}
182
{{#js}}
183
require(['tool_lp/course_competency_settings'], function(Mod) {
184
    (new Mod('[data-action=configure-course-competency-settings]'));
185
});
186
{{/js}}
187
{{/canconfigurecoursecompetencies}}