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 |
Plan page template.
|
|
|
19 |
}}
|
|
|
20 |
<div data-region="plan-page" data-id="{{plan.id}}" data-userid="{{plan.userid}}">
|
|
|
21 |
<h2>
|
|
|
22 |
{{{plan.name}}}
|
|
|
23 |
{{#plan.canbeedited}}
|
|
|
24 |
<a href="{{pluginbaseurl}}/editplan.php?id={{plan.id}}&userid={{plan.userid}}">{{#pix}}t/edit, core, {{#str}}editplan, tool_lp{{/str}}{{/pix}}</a>
|
|
|
25 |
{{/plan.canbeedited}}
|
|
|
26 |
</h2>
|
|
|
27 |
{{#plan.canbeedited}}
|
|
|
28 |
<div data-region="actions" class="clearfix my-4">
|
|
|
29 |
<div class="float-left my-3">
|
|
|
30 |
<!-- Button to add competencies to the plan -->
|
|
|
31 |
<button class="btn btn-secondary" data-action="add">{{#pix}}t/add, core,{{/pix}} {{#str}}addcompetency, tool_lp{{/str}}</button>
|
|
|
32 |
</div>
|
|
|
33 |
</div>
|
|
|
34 |
{{/plan.canbeedited}}
|
|
|
35 |
<div data-region="plan-summary" class="mt-1">
|
|
|
36 |
<div class="lead my-3">{{{plan.description}}}</div>
|
|
|
37 |
|
|
|
38 |
<div class="rui-info-container my-2">
|
|
|
39 |
|
|
|
40 |
<div class="rui-infobox rui-infobox--status">
|
|
|
41 |
<h5 class="rui-infobox-title">{{#str}}status, tool_lp{{/str}}</h5>
|
|
|
42 |
<div class="rui-infobox-content--small">
|
|
|
43 |
{{#plan.isinreview}}
|
|
|
44 |
- {{plan.reviewer.fullname}}
|
|
|
45 |
{{/plan.isinreview}}
|
|
|
46 |
|
|
|
47 |
<ul>
|
|
|
48 |
{{#plan.iscompleteallowed}}
|
|
|
49 |
<li><a data-action="plan-complete" href="#">{{#str}}completeplan, tool_lp{{/str}}</a></li>
|
|
|
50 |
{{/plan.iscompleteallowed}}
|
|
|
51 |
{{#plan.isreopenallowed}}
|
|
|
52 |
<li><a data-action="plan-reopen" href="#">{{#str}}reopenplan, tool_lp{{/str}}</a></li>
|
|
|
53 |
{{/plan.isreopenallowed}}
|
|
|
54 |
{{#plan.isrequestreviewallowed}}
|
|
|
55 |
<li><a data-action="plan-request-review" href="#">{{#str}}requestreview, tool_lp{{/str}}</a></li>
|
|
|
56 |
{{/plan.isrequestreviewallowed}}
|
|
|
57 |
{{#plan.iscancelreviewrequestallowed}}
|
|
|
58 |
<li><a data-action="plan-cancel-review-request" href="#">{{#str}}cancelreviewrequest, tool_lp{{/str}}</a></li>
|
|
|
59 |
{{/plan.iscancelreviewrequestallowed}}
|
|
|
60 |
{{#plan.isstartreviewallowed}}
|
|
|
61 |
<li><a data-action="plan-start-review" href="#">{{#str}}startreview, tool_lp{{/str}}</a></li>
|
|
|
62 |
{{/plan.isstartreviewallowed}}
|
|
|
63 |
{{#plan.isstopreviewallowed}}
|
|
|
64 |
<li><a data-action="plan-stop-review" href="#">{{#str}}stopreview, tool_lp{{/str}}</a></li>
|
|
|
65 |
{{/plan.isstopreviewallowed}}
|
|
|
66 |
{{#plan.isapproveallowed}}
|
|
|
67 |
<li><a data-action="plan-approve" href="#">{{#str}}planapprove, tool_lp{{/str}}</a></li>
|
|
|
68 |
{{/plan.isapproveallowed}}
|
|
|
69 |
{{#plan.isunapproveallowed}}
|
|
|
70 |
<li><a data-action="plan-unapprove" href="#">{{#str}}planunapprove, tool_lp{{/str}}</a></li>
|
|
|
71 |
{{/plan.isunapproveallowed}}
|
|
|
72 |
</ul>
|
|
|
73 |
|
|
|
74 |
</div>
|
|
|
75 |
</div>
|
|
|
76 |
|
|
|
77 |
{{#plan.duedate}}
|
|
|
78 |
<div class="rui-infobox rui-infobox--duedate">
|
|
|
79 |
<h5 class="rui-infobox-title">{{#str}}duedate, tool_lp{{/str}}</h5>
|
|
|
80 |
<div class="rui-infobox-content">{{plan.duedateformatted}}</div>
|
|
|
81 |
</div>
|
|
|
82 |
{{/plan.duedate}}
|
|
|
83 |
|
|
|
84 |
<div class="rui-infobox rui-infobox--progress">
|
|
|
85 |
<h5 class="rui-infobox-title">{{#str}}progress, tool_lp{{/str}}</h5>
|
|
|
86 |
<div class="rui-infobox-content--small">
|
|
|
87 |
{{< tool_lp/progress_bar}}
|
|
|
88 |
{{$progresstext}}
|
|
|
89 |
{{#str}}xcompetenciesproficientoutofy, tool_lp, { "x": "{{proficientcompetencycount}}", "y": "{{competencycount}}" }{{/str}}
|
|
|
90 |
{{/progresstext}}
|
|
|
91 |
{{$percentage}}{{proficientcompetencypercentage}}{{/percentage}}
|
|
|
92 |
{{$percentlabel}}{{proficientcompetencypercentageformatted}} %{{/percentlabel}}
|
|
|
93 |
{{/tool_lp/progress_bar}}
|
|
|
94 |
</div>
|
|
|
95 |
</div>
|
|
|
96 |
|
|
|
97 |
</div>
|
|
|
98 |
<dl>
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
{{#plan.template}}
|
|
|
102 |
<dt>{{#str}}template, tool_lp{{/str}}</dt>
|
|
|
103 |
<dd>
|
|
|
104 |
{{#canread}}
|
|
|
105 |
<a href="{{pluginbaseurl}}/templatecompetencies.php?templateid={{id}}&pagecontextid={{contextid}}">
|
|
|
106 |
{{/canread}}
|
|
|
107 |
{{{plan.template.shortname}}}{{#canread}}</a>{{/canread}}
|
|
|
108 |
{{#plan.isunlinkallowed}}
|
|
|
109 |
(<a data-action="plan-unlink" href="#">{{#str}}unlinkplantemplate, tool_lp{{/str}}</a>)
|
|
|
110 |
{{/plan.isunlinkallowed}}
|
|
|
111 |
</dd>
|
|
|
112 |
{{/plan.template}}
|
|
|
113 |
{{#description}}
|
|
|
114 |
<dt>{{#str}}description{{/str}}</dt>
|
|
|
115 |
<dd>{{{plan.description}}}</dd>
|
|
|
116 |
{{/description}}
|
|
|
117 |
|
|
|
118 |
</dl>
|
|
|
119 |
</div>
|
|
|
120 |
|
|
|
121 |
{{#plan.commentarea}}
|
|
|
122 |
{{#canpostorhascomments}}
|
|
|
123 |
<div data-region="comments" class="mt-2 mb-4">
|
|
|
124 |
{{>tool_lp/comment_area}}
|
|
|
125 |
</div>
|
|
|
126 |
{{/canpostorhascomments}}
|
|
|
127 |
{{/plan.commentarea}}
|
|
|
128 |
|
|
|
129 |
<fieldset data-region="plan-competencies" class="mt-4 pt-3 fieldset-styled">
|
|
|
130 |
<legend>{{#str}}learningplancompetencies, tool_lp{{/str}}</legend>
|
|
|
131 |
<table class="generaltable fullwidth managecompetencies my-0 pb-0">
|
|
|
132 |
<thead>
|
|
|
133 |
<tr>
|
|
|
134 |
<th scope="col">{{#str}}shortname, tool_lp{{/str}}</th>
|
|
|
135 |
<th scope="col">{{#str}}rating, tool_lp{{/str}}</th>
|
|
|
136 |
<th scope="col">{{#str}}proficient, tool_lp{{/str}}</th>
|
|
|
137 |
{{^plan.iscompleted}}
|
|
|
138 |
<th scope="col">{{#str}}status, tool_lp{{/str}}</th>
|
|
|
139 |
<th scope="col">{{#str}}actions, tool_lp{{/str}}</th>
|
|
|
140 |
{{/plan.iscompleted}}
|
|
|
141 |
</tr>
|
|
|
142 |
</thead>
|
|
|
143 |
<tbody class="drag-parentnode">
|
|
|
144 |
{{#competencies}}
|
|
|
145 |
<tr class="drag-samenode" data-node="user-competency" data-id="{{competency.id}}"
|
|
|
146 |
data-competencyid="{{competency.id}}"
|
|
|
147 |
data-userid="{{plan.userid}}">
|
|
|
148 |
<td>
|
|
|
149 |
{{#plan.canbeedited}}
|
|
|
150 |
<span class="drag-handlecontainer float-left"></span>
|
|
|
151 |
{{/plan.canbeedited}}
|
|
|
152 |
<a data-usercompetency="true" href="#">{{{competency.shortname}}}</a>
|
|
|
153 |
<em>{{competency.idnumber}}</em>
|
|
|
154 |
{{#comppath}}
|
|
|
155 |
<br>
|
|
|
156 |
<span class="float-left">{{#str}}path, tool_lp{{/str}} </span>{{> tool_lp/competency_path }}
|
|
|
157 |
{{/comppath}}
|
|
|
158 |
</td>
|
|
|
159 |
{{#plan.iscompleted}}
|
|
|
160 |
<td>{{usercompetencyplan.gradename}}</td>
|
|
|
161 |
<td>{{usercompetencyplan.proficiencyname}}</td>
|
|
|
162 |
{{/plan.iscompleted}}
|
|
|
163 |
{{^plan.iscompleted}}
|
|
|
164 |
<td>{{usercompetency.gradename}}</td>
|
|
|
165 |
<td>{{usercompetency.proficiencyname}}</td>
|
|
|
166 |
<td>{{usercompetency.statusname}}</td>
|
|
|
167 |
{{/plan.iscompleted}}
|
|
|
168 |
{{^plan.iscompleted}}
|
|
|
169 |
<td>
|
|
|
170 |
<ul title="{{#str}}edit{{/str}}" class="user-competency-actions">
|
|
|
171 |
<li>
|
|
|
172 |
<a href="#">{{#str}}edit{{/str}}</a><b class="caret"></b>
|
|
|
173 |
<ul class="dropdown dropdown-menu">
|
|
|
174 |
{{#usercompetency.isrequestreviewallowed}}
|
|
|
175 |
<li class="dropdown-item">
|
|
|
176 |
<a href="#" data-action="request-review">{{#pix}}t/edit, core{{/pix}} {{#str}}requestreview, tool_lp{{/str}}</a>
|
|
|
177 |
</li>
|
|
|
178 |
{{/usercompetency.isrequestreviewallowed}}
|
|
|
179 |
{{#usercompetency.iscancelreviewrequestallowed}}
|
|
|
180 |
<li class="dropdown-item">
|
|
|
181 |
<a href="#" data-action="cancel-review-request">{{#pix}}t/edit, core{{/pix}} {{#str}}cancelreviewrequest, tool_lp{{/str}}</a>
|
|
|
182 |
</li>
|
|
|
183 |
{{/usercompetency.iscancelreviewrequestallowed}}
|
|
|
184 |
{{#plan.canbeedited}}
|
|
|
185 |
<li class="dropdown-item">
|
|
|
186 |
<a href="#" data-action="delete-competency-link" data-id="{{competency.id}}">
|
|
|
187 |
{{#pix}}t/delete, core{{/pix}} {{#str}}delete{{/str}}
|
|
|
188 |
</a>
|
|
|
189 |
</li>
|
|
|
190 |
{{/plan.canbeedited}}
|
|
|
191 |
<li class="dropdown-item">
|
|
|
192 |
<a href="#" data-action="find-courses-link" data-id="{{competency.id}}">{{#pix}}t/preview, core{{/pix}} {{#str}}findcourses, tool_lp{{/str}}</a>
|
|
|
193 |
</li>
|
|
|
194 |
</ul>
|
|
|
195 |
</li>
|
|
|
196 |
</ul>
|
|
|
197 |
</td>
|
|
|
198 |
{{/plan.iscompleted}}
|
|
|
199 |
</tr>
|
|
|
200 |
{{/competencies}}
|
|
|
201 |
</tbody>
|
|
|
202 |
</table>
|
|
|
203 |
{{^competencies}}
|
|
|
204 |
<p class="alert alert-info">
|
|
|
205 |
{{#str}}nocompetenciesinlearningplan, tool_lp{{/str}}
|
|
|
206 |
</p>
|
|
|
207 |
{{/competencies}}
|
|
|
208 |
</fieldset>
|
|
|
209 |
</div>
|
|
|
210 |
{{#js}}
|
|
|
211 |
require(['tool_lp/competencies', 'tool_lp/planactions', 'tool_lp/user_competency_workflow', 'tool_lp/user_competency_plan_popup'], function(mod, actionsMod, UserCompWorkflow, Popup) {
|
|
|
212 |
var planActions = new actionsMod('plan');
|
|
|
213 |
|
|
|
214 |
(new mod({{plan.id}}, 'plan', {{contextid}}));
|
|
|
215 |
(new Popup('[data-region=plan-page]', '[data-usercompetency=true]', {{plan.id}}));
|
|
|
216 |
planActions.registerEvents();
|
|
|
217 |
|
|
|
218 |
var ucw = new UserCompWorkflow();
|
|
|
219 |
ucw.enhanceMenubar('.user-competency-actions');
|
|
|
220 |
ucw.on('status-changed', planActions.refresh.bind(planActions, '[data-region="plan-summary"]'));
|
|
|
221 |
ucw.on('error-occured', planActions.refresh.bind(planActions, '[data-region="plan-summary"]'));
|
|
|
222 |
});
|
|
|
223 |
{{/js}}
|
|
|
224 |
|