MDL-51025 tool_lp: Frameworks can be created on a category level

This commit is contained in:
Frederic Massart
2016-04-18 10:58:33 +08:00
parent 4511b7d694
commit 2de75345bb
31 changed files with 523 additions and 409 deletions
@@ -47,7 +47,8 @@ class competency_framework extends moodleform {
global $PAGE;
$mform = $this->_form;
$id = $this->_customdata;
$id = $this->_customdata['id'];
$context = $this->_customdata['context'];
$mform->addElement('hidden', 'id');
$mform->setType('id', PARAM_INT);
@@ -81,6 +82,9 @@ class competency_framework extends moodleform {
$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());
$this->add_action_buttons(true, get_string('savechanges', 'tool_lp'));
if (!empty($id)) {