{{! This file is part of Moodle - http://moodle.org/ Moodle is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Moodle is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Moodle. If not, see . }} {{! @template tool_lp/user_competency_summary_in_plan Moodle template for the the summary of a user competency Classes required for JS: * none Data attributes required for JS: * none Context variables required for this template: * usercompetencysummary - object containing: * showrelatedcompetencies - boolean * cangrade - boolean * competency - competency summary record * user - user record * usercompetency - user competency record * usercompetencyplan - user competency plan record * evidence - array of evidence * commentarea - comment block * plan - plan summary record * iscompleted - is completed This template does not have an example context because it includes ajax functionality. }} {{#usercompetencysummary}}
{{{plan.description}}}
{{#plan.iscompleted}} {{/plan.iscompleted}}
{{#competency}} {{> tool_lp/competency_summary }} {{/competency}}
{{#usercompetency}}
{{#str}}reviewstatus, tool_lp{{/str}}
{{statusname}} {{#isstatusinreview}} - {{reviewer.fullname}} {{/isstatusinreview}} {{#isrequestreviewallowed}}{{/isrequestreviewallowed}} {{#iscancelreviewrequestallowed}}{{/iscancelreviewrequestallowed}} {{#isstartreviewallowed}}{{/isstartreviewallowed}} {{#isstopreviewallowed}}{{/isstopreviewallowed}}
{{#str}}proficient, tool_lp{{/str}}
{{proficiencyname}}
{{#str}}rating, tool_lp{{/str}}
{{gradename}} {{#cangrade}} {{/cangrade}}
{{#js}} require(['jquery', 'tool_lp/grade_user_competency_inline', 'tool_lp/user_competency_info', 'tool_lp/user_competency_workflow'], function($, mod, info, UserCompWorkflow) { var competencyElement = $('[data-region-id="{{uniqid}}"]'); var infoReloader = new info(competencyElement, '{{competency.competency.id}}', '{{user.id}}', '{{plan.id}}'); var ucw = new UserCompWorkflow(); ucw.registerEvents('[data-region="user-competency-status"]'); ucw.on('status-changed', infoReloader.reload.bind(infoReloader)); ucw.on('error-occured', infoReloader.reload.bind(infoReloader)); {{#cangrade}} var inlineGrader = new mod('#rate_{{uniqid}}', '{{competency.scaleid}}', '{{competency.competency.id}}', '{{user.id}}', '{{plan.id}}', '', '{{#str}}chooserating, tool_lp{{/str}}'); inlineGrader.on('competencyupdated', infoReloader.reload.bind(infoReloader)); {{/cangrade}} }); {{/js}} {{/usercompetency}} {{#usercompetencyplan}}
{{#str}}rating, tool_lp{{/str}}
{{gradename}} - {{#str}}plancompleted, tool_lp{{/str}}
{{#str}}proficient, tool_lp{{/str}}
{{proficiencyname}}
{{/usercompetencyplan}}
{{#commentarea}} {{#canpostorhascomments}} {{>tool_lp/comment_area}} {{/canpostorhascomments}} {{/commentarea}}
{{#str}}evidence, tool_lp{{/str}}
{{#evidence}} {{> tool_lp/evidence_summary }} {{/evidence}} {{^evidence}}

{{#str}}noevidence, tool_lp{{/str}}

{{/evidence}}
{{/usercompetencysummary}}