diff --git a/admin/tool/lp/lib.php b/admin/tool/lp/lib.php index 1160a63093b..ea5f1cec01f 100644 --- a/admin/tool/lp/lib.php +++ b/admin/tool/lp/lib.php @@ -225,7 +225,7 @@ function tool_lp_coursemodule_edit_post_actions($data, $course) { */ function tool_lp_get_fontawesome_icon_map() { return [ - 'tool_lp:url' => 'fa-external-link' + 'tool_lp:url' => 'fa-arrow-up-right-from-square', ]; } diff --git a/admin/tool/lp/pix/url.png b/admin/tool/lp/pix/url.png deleted file mode 100644 index ae43c5a2afd..00000000000 Binary files a/admin/tool/lp/pix/url.png and /dev/null differ diff --git a/admin/tool/lp/pix/url.svg b/admin/tool/lp/pix/url.svg index 49788745bc0..1d8cac77a3b 100644 --- a/admin/tool/lp/pix/url.svg +++ b/admin/tool/lp/pix/url.svg @@ -1,21 +1 @@ - - - -]> - - - - - + diff --git a/admin/tool/lp/styles.css b/admin/tool/lp/styles.css index bfc7d6d1c88..2c4752aa275 100644 --- a/admin/tool/lp/styles.css +++ b/admin/tool/lp/styles.css @@ -247,3 +247,12 @@ input[type="checkbox"].tool_lp_scale_proficient { .path-admin-tool-lp #region-main { overflow-x: visible; } + +ul.competency-tree img { + width: 16px; + height: 16px; +} + +[data-region="managecompetencies"] a .icon { + color: initial; +} diff --git a/admin/tool/lp/templates/course_competencies_page.mustache b/admin/tool/lp/templates/course_competencies_page.mustache index 6837bfdebe0..fa6ef65d973 100644 --- a/admin/tool/lp/templates/course_competencies_page.mustache +++ b/admin/tool/lp/templates/course_competencies_page.mustache @@ -22,6 +22,34 @@ For a full list of the context for this template see the course_competencies_page renderable. This template includes ajax functionality, so it cannot be shown in the template library. + + Example context (json): + { + "canmanagecoursecompetencies": true, + "cangradecompetencies": true, + "settings": { + "pushratingstouserplans": true + }, + "canconfigurecoursecompetencies": true, + "competencies": [{ + "competency": { + "id": 2, + "shortname": "Competency1", + "idnumber": "COMP1", + "description": "Competency1 description" + }, + "coursecompetency": { + "id": 1 + }, + "ruleoutcomeoptions": [{ + "value": "1", + "text": "Mark as complete" + }, { + "value": "2", + "text": "Mark as complete and request review" + }] + }] + } }}
@@ -45,7 +73,7 @@ data-action="configure-course-competency-settings" data-courseid="{{courseid}}" data-pushratingstouserplans="{{settings.pushratingstouserplans}}"> - {{#pix}}t/edit, core, {{#str}}edit{{/str}}{{/pix}} + {{#pix}}i/settings, core, {{#str}}edit{{/str}}{{/pix}} {{/canconfigurecoursecompetencies}}

diff --git a/admin/tool/lp/templates/manage_competencies_page.mustache b/admin/tool/lp/templates/manage_competencies_page.mustache index 22eeb89ed6a..3830188254e 100644 --- a/admin/tool/lp/templates/manage_competencies_page.mustache +++ b/admin/tool/lp/templates/manage_competencies_page.mustache @@ -41,7 +41,7 @@

{{{framework.shortname}}} {{#canmanage}} - {{#pix}}t/edit, core, {{#str}}editcompetencyframework, tool_lp{{/str}}{{/pix}} + {{#pix}}i/settings, core, {{#str}}editcompetencyframework, tool_lp{{/str}}{{/pix}} {{/canmanage}}

{{{framework.description}}}
@@ -151,4 +151,3 @@ require(['tool_lp/tree', 'tool_lp/competencytree', 'tool_lp/competencyactions', }); {{/js}} - diff --git a/admin/tool/lp/templates/manage_competency_frameworks_page.mustache b/admin/tool/lp/templates/manage_competency_frameworks_page.mustache index 987befa598d..ebbd878ab3c 100644 --- a/admin/tool/lp/templates/manage_competency_frameworks_page.mustache +++ b/admin/tool/lp/templates/manage_competency_frameworks_page.mustache @@ -15,6 +15,8 @@ along with Moodle. If not, see . }} {{! + @template tool_lp/manage_competency_frameworks_page + Manage competency frameworks template. Classes required for JS: @@ -32,6 +34,21 @@ * competencyframeworks - array of objects containing id, shortname, idnumber, visible * canmanage - true if this user has permission to manage the frameworks * navigation - array of strings containing buttons for navigation + + Example context (json): + { + "competencyframeworks": { + "id": 1, + "shortname": "Framework1", + "idnumber": "FRAME1", + "visible": true, + "contextnamenoprefix": "System", + "competenciescount": 26, + "pluginbaseurl": "https://example.com", + "pagecontextid": 1 + }, + "canmanage": true + } }}
@@ -63,7 +80,7 @@