From 1040efea57d134e60dad08cfecceb524cfecea37 Mon Sep 17 00:00:00 2001 From: Sara Arjona Date: Mon, 8 Jul 2024 11:44:57 +0200 Subject: [PATCH] MDL-82211 tool_lp: Update SVG icons --- admin/tool/lp/lib.php | 2 +- admin/tool/lp/pix/url.png | Bin 510 -> 0 bytes admin/tool/lp/pix/url.svg | 22 +------------ admin/tool/lp/styles.css | 9 ++++++ .../course_competencies_page.mustache | 30 +++++++++++++++++- .../manage_competencies_page.mustache | 3 +- ...manage_competency_frameworks_page.mustache | 19 ++++++++++- .../templates/manage_templates_page.mustache | 19 ++++++++++- 8 files changed, 77 insertions(+), 27 deletions(-) delete mode 100644 admin/tool/lp/pix/url.png 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 ae43c5a2afda511733b3074817ebece53396346c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 510 zcmV|(P%U@8jX&$BHRMrP9~F$AP7_x#XI1pr27j6 zX_`JYv**CeFbp3_GJrhKPZdS+5xC%%Ot1yK@!mhovMi|9TdmeFNn=0@1;9_>FiDcG znSGDrH~{$D-vM@)39gyh6-nD>wi89sI7yOj)qC&v{>vaql6#V#0M0pgeL9`qs5S%N zB&`E?&1|RB>2%@Gn^tgF(layLm-N}pE>>`@Ry&-{W zFAwM3kFqR>z$Hoh3k8yTW_CNvvI8^IU@%xK%W^2`Dv-C^?cO56e2Cj-_DRxN;4+Yh zVYpd+-;=5aFdB`Hn$701q+7sgU^fgyzYGTW4HnMTy%aCAv;Y7A07*qoM6N<$f>4v- A&Hw-a 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 @@