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

This commit is contained in:
Frederic Massart 2015-08-11 18:55:19 +08:00
parent 4511b7d694
commit 2de75345bb
31 changed files with 523 additions and 409 deletions

View file

@ -65,5 +65,21 @@ function xmldb_tool_lp_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2015052404, 'tool', 'lp');
}
if ($oldversion < 2015052405) {
// Define field contextid to be added to tool_lp_competency_framework.
$table = new xmldb_table('tool_lp_competency_framework');
$field = new xmldb_field('contextid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null,
context_system::instance()->id, 'id');
// Conditionally launch add field contextid.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Lp savepoint reached.
upgrade_plugin_savepoint(true, 2015052405, 'tool', 'lp');
}
return true;
}