MDL-53084 tool_lp: Improve the view of user competency in a plan

* Remove the plan block
* Remove the plan link
This commit is contained in:
Issam Taboubi 2016-03-08 13:37:27 -05:00 committed by Frederic Massart
parent 9fbb3e6607
commit 3ed982e143
3 changed files with 3 additions and 38 deletions

View file

@ -391,8 +391,7 @@ $string['usercommentedonaplanhtml'] = '<p>{$a->fullname} commented on the plan "
$string['usercommentedonaplansmall'] = '{$a->fullname} commented on the plan "{$a->plan}".'; $string['usercommentedonaplansmall'] = '{$a->fullname} commented on the plan "{$a->plan}".';
$string['usercommentedonaplansubject'] = '{$a} commented on a plan.'; $string['usercommentedonaplansubject'] = '{$a} commented on a plan.';
$string['uponcoursemodulecompletion'] = 'Upon activity completion:'; $string['uponcoursemodulecompletion'] = 'Upon activity completion:';
$string['usercompetencyfrozen'] = '<p>This record is now frozen. It reflects the state of the user\'s competency when their plan was marked as complete.</p> $string['usercompetencyfrozen'] = 'This record is now frozen. It reflects the state of the user\'s competency when their plan was marked as complete.';
<p>Go back to <a href="{$a->url}">{$a->name}</a></p>';
$string['usercompetencystatus_idle'] = 'Idle'; $string['usercompetencystatus_idle'] = 'Idle';
$string['usercompetencystatus_inreview'] = 'In review'; $string['usercompetencystatus_inreview'] = 'In review';
$string['usercompetencystatus_waitingforreview'] = 'Waiting for review'; $string['usercompetencystatus_waitingforreview'] = 'Waiting for review';

View file

@ -38,49 +38,15 @@
* evidence - array of evidence * evidence - array of evidence
* commentarea - comment block * commentarea - comment block
* plan - plan summary record * plan - plan summary record
* statusname - status name
* description - plan description
* isdraft - is draft
* iscompleted - is completed * iscompleted - is completed
* duedateformatted - due date formatted
* url - url of the plan
* name - plan name
* template - template
This template does not have an example context because it includes ajax functionality. This template does not have an example context because it includes ajax functionality.
}} }}
{{#usercompetencysummary}} {{#usercompetencysummary}}
<div data-region="user-competency-full-info" data-node="user-competency" data-competencyid="{{usercompetency.competencyid}}" data-userid="{{usercompetency.userid}}" data-region-id="{{uniqid}}"> <div data-region="user-competency-full-info" data-node="user-competency" data-competencyid="{{usercompetency.competencyid}}" data-userid="{{usercompetency.userid}}" data-region-id="{{uniqid}}">
<div data-region="plan-summary">
<div class="well">
<dt>{{#str}}status, tool_lp{{/str}}</dt>
<dd>
<span class="label pull-left
{{#plan.iscompleted}}label-success{{/plan.iscompleted}}
{{^plan.iscompleted}}
{{#plan.isdraft}}label-warning{{/plan.isdraft}}
{{^plan.isdraft}}label-info{{/plan.isdraft}}
{{/plan.iscompleted}}">
{{plan.statusname}}
</span>
</dd>
{{#plan.duedate}}
<dt>{{#str}}duedate, tool_lp{{/str}}</dt>
<dd>{{plan.duedateformatted}}</dd>
{{/plan.duedate}}
{{#plan.template}}
<dt>{{#str}}template, tool_lp{{/str}}</dt>
<dd>{{plan.template.shortname}}</dd>
{{/plan.template}}
{{#description}}
<dt>{{#str}}description{{/str}}</dt>
<dd>{{{plan.description}}}</dd>
{{/description}}
</div>
</div>
{{#plan.iscompleted}} {{#plan.iscompleted}}
<div class="alert alert-info" role="alert"> <div class="alert alert-info" role="alert">
{{#str}} usercompetencyfrozen, tool_lp, { "url": "{{plan.url}}", "name": "{{plan.name}}" } {{/str}} {{#str}} usercompetencyfrozen, tool_lp {{/str}}
</div> </div>
{{/plan.iscompleted}} {{/plan.iscompleted}}
<div data-region="competency-summary"> <div data-region="competency-summary">

View file

@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
$plugin->version = 2016020914; // The current plugin version (Date: YYYYMMDDXX). $plugin->version = 2016020915; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2014110400; // Requires this Moodle version. $plugin->requires = 2014110400; // Requires this Moodle version.
$plugin->component = 'tool_lp'; // Full name of the plugin (used for diagnostics). $plugin->component = 'tool_lp'; // Full name of the plugin (used for diagnostics).