mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-53084 tool_lp: Improve the view of user competency in a plan
This commit is contained in:
parent
d9c1d95bd1
commit
e08203664a
@ -27,6 +27,7 @@ defined('MOODLE_INTERNAL') || die();
|
||||
use core_user;
|
||||
use renderer_base;
|
||||
use stdClass;
|
||||
use moodle_url;
|
||||
|
||||
/**
|
||||
* Class for exporting plan data.
|
||||
@ -98,6 +99,7 @@ class plan_exporter extends persistent_exporter {
|
||||
|
||||
$commentareaexporter = new comment_area_exporter($this->persistent->get_comment_object());
|
||||
$values->commentarea = $commentareaexporter->export($output);
|
||||
$values->url = new moodle_url('/admin/tool/lp/plan.php', array('id' => $this->persistent->get_id()));
|
||||
|
||||
return (array) $values;
|
||||
}
|
||||
@ -178,6 +180,9 @@ class plan_exporter extends persistent_exporter {
|
||||
'type' => template_exporter::read_properties_definition(),
|
||||
'optional' => true,
|
||||
),
|
||||
'url' => array(
|
||||
'type' => PARAM_TEXT
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -390,6 +390,8 @@ $string['usercommentedonaplanhtml'] = '<p>{$a->fullname} commented on the plan "
|
||||
$string['usercommentedonaplansmall'] = '{$a->fullname} commented on the plan "{$a->plan}".';
|
||||
$string['usercommentedonaplansubject'] = '{$a} commented on a plan.';
|
||||
$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>
|
||||
<p>Go back to <a href="{$a->url}">{$a->name}</a></p>';
|
||||
$string['usercompetencystatus_idle'] = 'Idle';
|
||||
$string['usercompetencystatus_inreview'] = 'In review';
|
||||
$string['usercompetencystatus_waitingforreview'] = 'Waiting for review';
|
||||
|
@ -34,13 +34,55 @@
|
||||
* 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
|
||||
* statusname - status name
|
||||
* description - plan description
|
||||
* isdraft - is draft
|
||||
* 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.
|
||||
}}
|
||||
{{#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="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}}
|
||||
<div class="alert alert-info" role="alert">
|
||||
{{#str}} usercompetencyfrozen, tool_lp, { "url": "{{plan.url}}", "name": "{{plan.name}}" } {{/str}}
|
||||
</div>
|
||||
{{/plan.iscompleted}}
|
||||
<div data-region="competency-summary">
|
||||
{{#competency}}
|
||||
{{> tool_lp/competency_summary }}
|
||||
@ -68,7 +110,7 @@
|
||||
<dt>{{#str}}rating, tool_lp{{/str}}</dt>
|
||||
<dd>{{gradename}}
|
||||
{{#cangradeorsuggest}}
|
||||
<buttn class="btn" id="rate_{{uniqid}}">{{#str}}rate, tool_lp{{/str}}</button>
|
||||
<button class="btn" id="rate_{{uniqid}}">{{#str}}rate, tool_lp{{/str}}</button>
|
||||
{{/cangradeorsuggest}}
|
||||
</dd>
|
||||
{{#js}}
|
||||
@ -117,6 +159,7 @@
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{{/usercompetencysummary}}
|
||||
|
||||
{{#js}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user