Skip to content

Commit

Permalink
Merge branch 'MDL-54073-master' of git://github.com/junpataleta/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols authored and David Monllao committed May 13, 2016
2 parents 378733a + 32cf4bc commit 07d4b49
Show file tree
Hide file tree
Showing 28 changed files with 47 additions and 41 deletions.
2 changes: 1 addition & 1 deletion admin/tool/lp/classes/form/competency.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function definition() {
$mform->setType('description', PARAM_RAW);
// ID number.
$mform->addElement('text', 'idnumber', get_string('idnumber', 'tool_lp'), 'maxlength="100"');
$mform->setType('idnumber', PARAM_TEXT);
$mform->setType('idnumber', PARAM_RAW);
$mform->addRule('idnumber', null, 'required', null, 'client');
$mform->addRule('idnumber', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');

Expand Down
2 changes: 1 addition & 1 deletion admin/tool/lp/classes/form/competency_framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function definition() {
$mform->setType('description', PARAM_RAW);
// ID number.
$mform->addElement('text', 'idnumber', get_string('idnumber', 'tool_lp'), 'maxlength="100"');
$mform->setType('idnumber', PARAM_TEXT);
$mform->setType('idnumber', PARAM_RAW);
$mform->addRule('idnumber', null, 'required', null, 'client');
$mform->addRule('idnumber', get_string('maximumchars', '', 100), 'maxlength', 100, 'client');

Expand Down
2 changes: 1 addition & 1 deletion admin/tool/lp/templates/competencies_move_tree.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<ul data-enhance="movetree" style="display: none;">
<li>
<span>{{framework.shortname}}</span>
<span>{{{framework.shortname}}}</span>
<ul>
{{#competencies}}
{{> tool_lp/competencies_tree }}
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/lp/templates/competencies_tree.mustache
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<li data-id="{{id}}">
{{#canmanage}}
<span draggable="true">
{{shortname}}
{{{shortname}}}
</span>
{{/canmanage}}
{{^canmanage}}
<span>
{{shortname}}
{{{shortname}}}
</span>
{{/canmanage}}
{{#haschildren}}
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/lp/templates/competencies_tree_root.mustache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ul data-enhance="tree">
<li><span>{{shortname}}</span>
<li><span>{{{shortname}}}</span>
<ul>
{{#competencies}}
{{> tool_lp/competencies_tree }}
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/lp/templates/competency_path.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
}}
<nav id="competency-path-{{uniqid}}">
<small>
<a href="{{pluginbaseurl}}/competencies.php?competencyframeworkid={{framework.id}}&pagecontextid={{pagecontextid}}" >{{framework.name}}</a>
<a href="{{pluginbaseurl}}/competencies.php?competencyframeworkid={{framework.id}}&pagecontextid={{pagecontextid}}" >{{{framework.name}}}</a>
/
{{#ancestors}}
<a data-action="competency-dialogue" href="#" data-id="{{id}}">{{name}}</a>
<a data-action="competency-dialogue" href="#" data-id="{{id}}">{{{name}}}</a>
{{^last}}<span> / </span>{{/last}}
{{/ancestors}}
</small>
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/lp/templates/competency_picker.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<h3>{{#str}}competencyframeworks, tool_lp{{/str}}</h3>
<select data-action="chooseframework">
{{#frameworks}}
<option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{shortname}} <em>{{idnumber}}</em></option>
<option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{{shortname}}} <em>{{idnumber}}</em></option>
{{/frameworks}}
</select>
{{/singleFramework}}
Expand All @@ -15,7 +15,7 @@
<button>{{#pix}}a/search, ,{{#str}}search{{/str}}{{/pix}}</button>
</form>
<ul data-enhance="linktree" style="display: none;">
<li><span>{{framework.shortname}}</span>
<li><span>{{{framework.shortname}}}</span>
<ul>
{{#competencies}}
{{> tool_lp/competencies_tree }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<button>{{#pix}}a/search, ,{{#str}}search{{/str}}{{/pix}}</button>
</form>
<ul data-enhance="linktree" style="display: none;">
<li data-id="0"><span>{{framework.shortname}}</span>
<li data-id="0"><span>{{{framework.shortname}}}</span>
<ul>
{{#competencies}}
{{> tool_lp/competencies_tree }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<label for="competency-nav-{{uniqid}}" class="accesshide">{{#str}}jumptocompetency, tool_lp{{/str}}</label>
<select id="competency-nav-{{uniqid}}">
{{#competencies}}
<option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{shortname}} {{idnumber}}</option>
<option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{{shortname}}} {{idnumber}}</option>
{{/competencies}}
</select>
</span>
Expand Down
12 changes: 9 additions & 3 deletions admin/tool/lp/templates/competency_rule_points.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@
<tbody>
{{#children}}
<tr data-competency="{{id}}">
<th scope="row">{{shortname}}</th>
<td><input type="number" min="0" value="{{points}}" name="points" aria-label="{{#str}}pointsgivenfor, tool_lp, {{competency.shortname}}{{/str}}"></td>
<td><input type="checkbox" value="1" name="required" {{#required}}checked{{/required}} aria-label="{{#str}}aisrequired, tool_lp, {{competency.shortname}}{{/str}}"></td>
<th scope="row">{{{shortname}}}</th>
<td>
<label class="accesshide" for="pointsforcompetency-{{id}}">{{#str}}pointsgivenfor, tool_lp, {{{competency.shortname}}}{{/str}}</label>
<input id="pointsforcompetency-{{id}}" type="number" min="0" value="{{points}}" name="points" />
</td>
<td>
<label class="accesshide" for="competency-{{id}}-isrequired">{{#str}}aisrequired, tool_lp, {{{competency.shortname}}}{{/str}}</label>
<input id="competency-{{id}}-isrequired" type="checkbox" value="1" name="required" {{#required}}checked{{/required}} />
</td>
</tr>
{{/children}}
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/lp/templates/competency_summary.mustache
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div class='competency-heading'>
<h4 id="competency_link_{{competency.id}}">{{competency.shortname}}
<h4 id="competency_link_{{competency.id}}">{{{competency.shortname}}}
<small>{{competency.idnumber}}</small>
</h4>
{{#framework}}
<div class='competency-origin'>
<p><small>{{framework.shortname}} - {{taxonomyterm}}</small>
<p><small>{{{framework.shortname}}} - {{taxonomyterm}}</small>
</div>
{{/framework}}
</div>
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/lp/templates/course_competencies_page.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<a href="{{pluginbaseurl}}user_competency_in_course.php?courseid={{courseid}}&competencyid={{competency.id}}&userid={{gradableuserid}}"
id="competency-info-link-{{competency.id}}"
title="{{#str}}viewdetails, tool_lp{{/str}}">
<p><strong>{{competency.shortname}} <em>{{competency.idnumber}}</em></strong></p>
<p><strong>{{{competency.shortname}}} <em>{{competency.idnumber}}</em></strong></p>
</a>
<p>{{{competency.description}}}</p>
{{/competency}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<div>
{{#leastproficient}}
<a href="#competency-info-link-{{id}}">
<div><p>{{shortname}} <em>{{idnumber}}</em></p></div>
<div><p>{{{shortname}}} <em>{{idnumber}}</em></p></div>
</a>
{{/leastproficient}}
</div>
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/lp/templates/manage_competencies_page.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}}
<div data-region="managecompetencies">
<h2>
{{framework.shortname}}
{{{framework.shortname}}}
{{#canmanage}}
<a href="{{pluginbaseurl}}/editcompetencyframework.php?id={{framework.id}}&pagecontextid={{pagecontextid}}&return=competencies">{{#pix}}t/edit, core, {{#str}}editcompetencyframework, tool_lp{{/str}}{{/pix}}</a>
{{/canmanage}}
Expand Down Expand Up @@ -121,7 +121,7 @@ require(['tool_lp/tree', 'tool_lp/competencytree', 'tool_lp/competencyactions',
function(ariatree, treeModel, actions, $) {
treeModel.init({{framework.id}},
'{{framework.shortname}}',
{{#quote}} {{{framework.shortname}}} {{/quote}},
'{{search}}',
'[data-enhance=tree]',
{{canmanage}});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<tbody class="drag-parentnode">
{{#competencyframeworks}}
<tr class="drag-samenode" data-frameworkid="{{id}}">
<td><span class="drag-handlecontainer"></span><span><a href="{{pluginbaseurl}}/competencies.php?competencyframeworkid={{id}}&amp;pagecontextid={{pagecontextid}}">{{shortname}} ({{idnumber}})</a></span> {{^visible}}{{#str}}hiddenhint, tool_lp{{/str}}{{/visible}}</td>
<td><span class="drag-handlecontainer"></span><span><a href="{{pluginbaseurl}}/competencies.php?competencyframeworkid={{id}}&amp;pagecontextid={{pagecontextid}}">{{{shortname}}} ({{idnumber}})</a></span> {{^visible}}{{#str}}hiddenhint, tool_lp{{/str}}{{/visible}}</td>
<td>{{competenciescount}}</td>
<td>{{contextnamenoprefix}}</td>
<td>
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/lp/templates/manage_templates_page.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<tbody class="drag-parentnode">
{{#templates}}
<tr class="drag-samenode" data-templateid="{{id}}">
<td><a href="{{pluginbaseurl}}/templatecompetencies.php?templateid={{id}}&amp;pagecontextid={{pagecontextid}}">{{shortname}}</a></span> {{^visible}}{{#str}}hiddenhint, tool_lp{{/str}}{{/visible}}</td>
<td><a href="{{pluginbaseurl}}/templatecompetencies.php?templateid={{id}}&amp;pagecontextid={{pagecontextid}}">{{{shortname}}}</a></span> {{^visible}}{{#str}}hiddenhint, tool_lp{{/str}}{{/visible}}</td>
<td>{{contextnamenoprefix}}</td>
<td><a class="template-cohorts" href="{{pluginbaseurl}}/template_cohorts.php?id={{id}}&amp;pagecontextid={{pagecontextid}}">{{cohortscount}}</a></td>
<td><a class="template-userplans" href="{{pluginbaseurl}}/template_plans.php?id={{id}}&amp;pagecontextid={{pagecontextid}}">{{planscount}}</a></td>
Expand Down
6 changes: 3 additions & 3 deletions admin/tool/lp/templates/plan_page.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}}
<div data-region="plan-page" data-id="{{plan.id}}" data-userid="{{plan.userid}}">
<h2>
{{plan.name}}
{{{plan.name}}}
{{#plan.canbeedited}}
<a href="{{pluginbaseurl}}/editplan.php?id={{plan.id}}&amp;userid={{plan.userid}}">{{#pix}}t/edit, core, {{#str}}editplan, tool_lp{{/str}}{{/pix}}</a>
{{/plan.canbeedited}}
Expand Down Expand Up @@ -79,7 +79,7 @@
{{#canread}}
<a href="{{pluginbaseurl}}/templatecompetencies.php?templateid={{id}}&amp;pagecontextid={{contextid}}">
{{/canread}}
{{plan.template.shortname}}{{#canread}}</a>{{/canread}}
{{{plan.template.shortname}}}{{#canread}}</a>{{/canread}}
{{#plan.isunlinkallowed}}
(<a data-action="plan-unlink" href="#">{{#str}}unlinkplantemplate, tool_lp{{/str}}</a>)
{{/plan.isunlinkallowed}}
Expand Down Expand Up @@ -135,7 +135,7 @@
{{#plan.canbeedited}}
<span class="drag-handlecontainer pull-left"></span>
{{/plan.canbeedited}}
<a data-usercompetency="true" href="#">{{competency.shortname}}</a>
<a data-usercompetency="true" href="#">{{{competency.shortname}}}</a>
<em>{{competency.idnumber}}</em>
{{#comppath}}
<br>
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/lp/templates/plans_page.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
{{#plans}}
<tr data-region="plan-node" data-id="{{id}}" data-userid="{{userid}}">
<td>
<span><a href="{{pluginbaseurl}}/plan.php?id={{id}}">{{name}}</a></span>
<span><a href="{{pluginbaseurl}}/plan.php?id={{id}}">{{{name}}}</a></span>
</td>
<td>
{{#isbasedontemplate}}
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/lp/templates/related_competencies.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{{/showdeleterelatedaction}}
<p>
<a href="#" data-action="competency-dialogue" data-id="{{id}}">
{{shortname}}{{#idnumber}} {{idnumber}}{{/idnumber}}
{{{shortname}}}{{#idnumber}} {{idnumber}}{{/idnumber}}
</a>
</p>
</li>
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/lp/templates/template_competencies_page.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}}
<div data-region="templatecompetenciespage">
<h2>
{{template.shortname}}
{{{template.shortname}}}
{{#template.canmanage}}
<a href="{{pluginbaseurl}}/edittemplate.php?id={{template.id}}&amp;pagecontextid={{pagecontextid}}">{{#pix}}t/edit, core, {{#str}}edittemplate, tool_lp{{/str}}{{/pix}}</a>
{{/template.canmanage}}
Expand Down Expand Up @@ -55,7 +55,7 @@
{{#hascourses}}
<ul class="inline">
{{#linkedcourses}}
<li><a href="{{viewurl}}?id={{id}}">{{fullname}} ({{shortname}})</a></li>
<li><a href="{{viewurl}}?id={{id}}">{{fullname}} ({{{shortname}}})</a></li>
{{/linkedcourses}}
</ul>
{{/hascourses}}
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/lp/templates/template_statistics.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
{{#showcompetencylinks}}
<a href="#competency_link_{{id}}">
{{/showcompetencylinks}}
<div><p>{{shortname}} <em>{{idnumber}}</em></p></div>
<div><p>{{{shortname}}} <em>{{idnumber}}</em></p></div>
{{#showcompetencylinks}}
</a>
{{/showcompetencylinks}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<label for="competency-nav-{{uniqid}}" class="accesshide">{{#str}}jumptocompetency, tool_lp{{/str}}</label>
<select id="competency-nav-{{uniqid}}">
{{#competencies}}
<option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{shortname}} {{idnumber}}</option>
<option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{{shortname}}} {{idnumber}}</option>
{{/competencies}}
</select>
</span>
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/lp/templates/user_evidence_list_page.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<tbody>
{{#evidence}}
<tr data-region='user-evidence-node' data-id="{{id}}" data-userid="{{userid}}">
<td><a href="{{pluginbaseurl}}/user_evidence.php?id={{id}}">{{name}}</a></td>
<td><a href="{{pluginbaseurl}}/user_evidence.php?id={{id}}">{{{name}}}</a></td>
<td>
{{^hasurlorfiles}}
-
Expand All @@ -77,7 +77,7 @@
<ul class="user-evidence-competencies">
{{#usercompetencies}}
<li>
{{competency.shortname}} <small><em>{{competency.idnumber}}</em></small> ({{usercompetency.statusname}}{{#usercompetency.reviewer.fullname}} / {{usercompetency.reviewer.fullname}}{{/usercompetency.reviewer.fullname}})
{{{competency.shortname}}} <small><em>{{competency.idnumber}}</em></small> ({{usercompetency.statusname}}{{#usercompetency.reviewer.fullname}} / {{usercompetency.reviewer.fullname}}{{/usercompetency.reviewer.fullname}})
</li>
{{/usercompetencies}}
</ul>
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/lp/templates/user_evidence_page.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{{#userevidence}}
<div data-region="user-evidence-page" data-id="{{id}}" data-userid="{{userid}}">
<h2>
{{name}}
{{{name}}}
{{#canmanage}}
<a href="{{pluginbaseurl}}/user_evidence_edit.php?id={{id}}&amp;userid={{userid}}">{{#pix}}t/edit, core, {{#str}}editthisuserevidence, tool_lp{{/str}}{{/pix}}</a>
{{/canmanage}}
Expand Down Expand Up @@ -78,7 +78,7 @@
{{#usercompetencies}}
<tr data-id="{{competency.id}}">
<td>
<a href="{{pluginbaseurl}}/user_competency.php?id={{usercompetency.id}}" data-id="{{usercompetency.id}}">{{competency.shortname}}</a>
<a href="{{pluginbaseurl}}/user_competency.php?id={{usercompetency.id}}" data-id="{{usercompetency.id}}">{{{competency.shortname}}}</a>
</td>
<td>
{{usercompetency.statusname}} {{#usercompetency.reviewer.fullname}} / {{usercompetency.reviewer.fullname}}{{/usercompetency.reviewer.fullname}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<h4>{{#str}}unmappedin, tool_lpmigrate, {{frameworkfrom.shortname}}{{/str}}</h4>
<ul>
{{#unmappedfrom}}
<li><a href="#" data-id="{{id}}" data-action="competency-dialogue" data-includecourses="true">{{shortname}}</a> <em>{{idnumber}}</em></li>
<li><a href="#" data-id="{{id}}" data-action="competency-dialogue" data-includecourses="true">{{{shortname}}}</a> <em>{{idnumber}}</em></li>
{{/unmappedfrom}}
</ul>
{{/hasunmappedfrom}}
Expand All @@ -119,7 +119,7 @@
<h4>{{#str}}unmappedin, tool_lpmigrate, {{frameworkto.shortname}}{{/str}}</h4>
<ul>
{{#unmappedto}}
<li><a href="#" data-id="{{id}}" data-action="competency-dialogue" data-includecourses="true">{{shortname}}</a> <em>{{idnumber}}</em></li>
<li><a href="#" data-id="{{id}}" data-action="competency-dialogue" data-includecourses="true">{{{shortname}}}</a> <em>{{idnumber}}</em></li>
{{/unmappedto}}
</ul>
{{/hasunmappedto}}
Expand Down
2 changes: 1 addition & 1 deletion competency/classes/competency.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected static function define_properties() {
'type' => PARAM_TEXT
),
'idnumber' => array(
'type' => PARAM_TEXT
'type' => PARAM_RAW
),
'description' => array(
'default' => '',
Expand Down
2 changes: 1 addition & 1 deletion competency/classes/competency_framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected static function define_properties() {
'type' => PARAM_TEXT
),
'idnumber' => array(
'type' => PARAM_TEXT
'type' => PARAM_RAW
),
'description' => array(
'type' => PARAM_RAW,
Expand Down
2 changes: 1 addition & 1 deletion report/competency/templates/report.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{{#competency}}
<td>
<a href="#" data-action="competency-dialogue" data-id="{{competency.id}}">
{{competency.shortname}} <em data-id="{{competency.id}}">{{competency.idnumber}}</em>
{{{competency.shortname}}} <em data-id="{{competency.id}}">{{competency.idnumber}}</em>
</a>
</td>
{{/competency}}
Expand Down

0 comments on commit 07d4b49

Please sign in to comment.