*/
protected function get_other_values(renderer_base $output) {
$filters = array('competencyframeworkid' => $this->persistent->get_id());
+ $context = $this->persistent->get_context();
return array(
- 'canmanage' => has_capability('tool/lp:competencymanage', $this->persistent->get_context()),
+ 'canmanage' => has_capability('tool/lp:competencymanage', $context),
'competenciescount' => api::count_competencies($filters),
- 'contextname' => $this->persistent->get_context()->get_context_name()
+ 'contextname' => $context->get_context_name(),
+ 'contextnamenoprefix' => $context->get_context_name(false)
);
}
),
'contextname' => array(
'type' => PARAM_TEXT
+ ),
+ 'contextnamenoprefix' => array(
+ 'type' => PARAM_TEXT
)
);
}
}
protected function get_other_values(renderer_base $output) {
+ $context = $this->persistent->get_context();
return array(
'duedateformatted' => userdate($this->persistent->get_duedate()),
'cohortscount' => template_cohort::count_records(array('templateid' => $this->persistent->get_id())),
'planscount' => plan::count_records(array('templateid' => $this->persistent->get_id())),
'canmanage' => $this->persistent->can_manage(),
'canread' => $this->persistent->can_read(),
- 'contextname' => $this->persistent->get_context()->get_context_name()
+ 'contextname' => $context->get_context_name(),
+ 'contextnamenoprefix' => $context->get_context_name(false)
);
}
),
'contextname' => array(
'type' => PARAM_TEXT,
+ ),
+ 'contextnamenoprefix' => array(
+ 'type' => PARAM_TEXT,
)
);
}
$mform->setDefault('visible', true);
$mform->addHelpButton('visible', 'visible', 'tool_lp');
- $mform->addElement('static', 'context', get_string('context', 'core_role'));
- $mform->setDefault('context', $context->get_context_name());
+ $mform->addElement('static', 'context', get_string('category', 'tool_lp'));
+ $mform->setDefault('context', $context->get_context_name(false));
$mform->addElement('header', 'taxonomyhdr', get_string('taxonomies', 'tool_lp'));
$taxonomies = \tool_lp\competency_framework::get_taxonomies_list();
$mform->setDefault('visible', true);
$mform->addHelpButton('visible', 'visible', 'tool_lp');
- $mform->addElement('static', 'context', get_string('context', 'core_role'));
- $mform->setDefault('context', $context->get_context_name());
+ $mform->addElement('static', 'context', get_string('category', 'tool_lp'));
+ $mform->setDefault('context', $context->get_context_name(false));
// Disable short forms.
$mform->setDisableShortforms();
$string['cannotaddrules'] = 'This competency cannot be configured.';
$string['cannotcreateuserplanswhentemplateduedateispassed'] = 'New user plans can not be created: this template\'s due date has, or is about to, expire.';
$string['cannotcreateuserplanswhentemplatehidden'] = 'New user plans can not be created while this template is hidden.';
+$string['category'] = 'Category';
$string['chooserating'] = 'Choose a rating...';
$string['cohortssyncedtotemplate'] = 'Cohorts synced to this template';
$string['competencies'] = 'Competencies';
<tr>
<th scope="col">{{#str}}competencyframeworkname, tool_lp{{/str}}</th>
<th scope="col">{{#str}}competencies, tool_lp{{/str}}</th>
- <th scope="col">{{#str}}context, core_role{{/str}}</th>
+ <th scope="col">{{#str}}category, tool_lp{{/str}}</th>
<th scope="col">{{#str}}actions, tool_lp{{/str}}</th>
</tr>
</thead>
<tr class="drag-samenode" data-frameworkid="{{id}}">
<td><span class="drag-handlecontainer"></span><span><a href="{{pluginbaseurl}}/competencies.php?competencyframeworkid={{id}}&pagecontextid={{pagecontextid}}">{{shortname}} ({{idnumber}})</a></span> {{^visible}}{{#str}}hiddenhint, tool_lp{{/str}}{{/visible}}</td>
<td>{{competenciescount}}</td>
- <td>{{contextname}}</td>
+ <td>{{contextnamenoprefix}}</td>
<td>
{{#canmanage}}
<ul title="{{#str}}edit{{/str}}" class="competencyframeworkactions">
<thead>
<tr>
<th scope="col">{{#str}}templatename, tool_lp{{/str}}</th>
- <th scope="col">{{#str}}context, core_role{{/str}}</th>
+ <th scope="col">{{#str}}category, tool_lp{{/str}}</th>
<th scope="col">{{#str}}cohorts, core_cohort{{/str}}</th>
<th scope="col">{{#str}}userplans, tool_lp{{/str}}</th>
{{#canmanage}}
{{#templates}}
<tr class="drag-samenode" data-templateid="{{id}}">
<td><a href="{{pluginbaseurl}}/templatecompetencies.php?templateid={{id}}&pagecontextid={{pagecontextid}}">{{shortname}}</a></span> {{^visible}}{{#str}}hiddenhint, tool_lp{{/str}}{{/visible}}</td>
- <td>{{contextname}}</td>
+ <td>{{contextnamenoprefix}}</td>
<td><a class="template-cohorts" href="{{pluginbaseurl}}/template_cohorts.php?id={{id}}&pagecontextid={{pagecontextid}}">{{cohortscount}}</a></td>
<td><a class="template-userplans" href="{{pluginbaseurl}}/template_plans.php?id={{id}}&pagecontextid={{pagecontextid}}">{{planscount}}</a></td>
<td>