mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-53982 competency: Javascript error due to string injection
This commit is contained in:
parent
71c0a5745c
commit
60011d9a8a
@ -79,7 +79,6 @@ class competency_plan_navigation implements renderable, templatable {
|
||||
$data->competencyid = $this->competencyid;
|
||||
$data->planid = $this->planid;
|
||||
$data->baseurl = $this->baseurl;
|
||||
$data->jumptocompetency = get_string('jumptocompetency', 'tool_lp');
|
||||
|
||||
$plancompetencies = \core_competency\api::list_plan_competencies($data->planid);
|
||||
$data->competencies = array();
|
||||
|
@ -84,8 +84,6 @@ class user_competency_course_navigation implements renderable, templatable {
|
||||
$data->courseid = $this->courseid;
|
||||
$data->baseurl = $this->baseurl;
|
||||
$data->groupselector = '';
|
||||
$data->jumptocompetency = get_string('jumptocompetency', 'tool_lp');
|
||||
$data->jumptouser = get_string('jumptouser', 'tool_lp');
|
||||
|
||||
if (has_any_capability(array('moodle/competency:usercompetencyview', 'moodle/competency:coursecompetencymanage'),
|
||||
$context)) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="pull-right well">
|
||||
{{#hascompetencies}}
|
||||
<span>
|
||||
<label for="competency-nav-{{uniqid}}" class="accesshide">{{jumptocompetency}}</label>
|
||||
<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>
|
||||
@ -15,7 +15,7 @@
|
||||
require(['core/form-autocomplete', 'tool_lp/competency_plan_navigation'], function(autocomplete, nav) {
|
||||
(new nav('#competency-nav-{{uniqid}}', '{{baseurl}}', {{userid}}, {{competencyid}}, {{planid}}));
|
||||
{{#hascompetencies}}
|
||||
autocomplete.enhance('#competency-nav-{{uniqid}}', false, false, '{{jumptocompetency}}');
|
||||
autocomplete.enhance('#competency-nav-{{uniqid}}', false, false, {{# quote }}{{# str }}jumptocompetency, tool_lp{{/ str }}{{/ quote }});
|
||||
{{/hascompetencies}}
|
||||
|
||||
});
|
||||
|
@ -3,7 +3,7 @@
|
||||
<form class="user-competency-course-navigation">
|
||||
{{#hasusers}}
|
||||
<span>
|
||||
<label for="user-nav-{{uniqid}}" class="accesshide">{{jumptouser}}</label>
|
||||
<label for="user-nav-{{uniqid}}" class="accesshide">{{#str}}jumptouser, tool_lp{{/str}}</label>
|
||||
<select id="user-nav-{{uniqid}}">
|
||||
{{#users}}
|
||||
<option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{fullname}}</option>
|
||||
@ -14,7 +14,7 @@
|
||||
<br>
|
||||
{{#hascompetencies}}
|
||||
<span>
|
||||
<label for="competency-nav-{{uniqid}}" class="accesshide">{{jumptocompetency}}</label>
|
||||
<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>
|
||||
@ -28,10 +28,10 @@
|
||||
require(['core/form-autocomplete', 'tool_lp/user_competency_course_navigation'], function(autocomplete, nav) {
|
||||
(new nav('#user-nav-{{uniqid}}', '#competency-nav-{{uniqid}}', '{{baseurl}}', {{userid}}, {{competencyid}}, {{courseid}}));
|
||||
{{#hasusers}}
|
||||
autocomplete.enhance('#user-nav-{{uniqid}}', false, false, '{{jumptouser}}');
|
||||
autocomplete.enhance('#user-nav-{{uniqid}}', false, false, {{# quote }}{{# str }}jumptouser, tool_lp{{/ str }}{{/ quote }});
|
||||
{{/hasusers}}
|
||||
{{#hascompetencies}}
|
||||
autocomplete.enhance('#competency-nav-{{uniqid}}', false, false, '{{jumptocompetency}}');
|
||||
autocomplete.enhance('#competency-nav-{{uniqid}}', false, false, {{# quote }}{{# str }}jumptocompetency, tool_lp{{/ str }}{{/ quote }});
|
||||
{{/hascompetencies}}
|
||||
|
||||
});
|
||||
|
@ -77,7 +77,6 @@ class user_course_navigation implements renderable, templatable {
|
||||
$data->courseid = $this->courseid;
|
||||
$data->baseurl = $this->baseurl;
|
||||
$data->groupselector = '';
|
||||
$data->jumptouser = get_string('jumptouser', 'tool_lp');
|
||||
|
||||
if (has_any_capability(array('moodle/competency:usercompetencyview', 'moodle/competency:coursecompetencymanage'),
|
||||
$context)) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<form class="user-competency-course-navigation">
|
||||
{{#hasusers}}
|
||||
<span>
|
||||
<label for="user-nav-{{uniqid}}" class="accesshide">{{jumptouser}}</label>
|
||||
<label for="user-nav-{{uniqid}}" class="accesshide">{{#str}}jumptouser, tool_lp{{/str}}</label>
|
||||
<select id="user-nav-{{uniqid}}">
|
||||
{{#users}}
|
||||
<option value="{{id}}" {{#selected}}selected="selected"{{/selected}}>{{fullname}}</option>
|
||||
@ -17,7 +17,7 @@
|
||||
require(['core/form-autocomplete', 'report_competency/user_course_navigation'], function(autocomplete, nav) {
|
||||
(new nav('#user-nav-{{uniqid}}', '{{baseurl}}', {{userid}}, {{courseid}}));
|
||||
{{#hasusers}}
|
||||
autocomplete.enhance('#user-nav-{{uniqid}}', false, false, '{{jumptouser}}');
|
||||
autocomplete.enhance('#user-nav-{{uniqid}}', false, false, {{# quote }}{{# str }}jumptouser, tool_lp{{/ str }}{{/ quote }});
|
||||
{{/hasusers}}
|
||||
});
|
||||
{{/js}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user