mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
MDL-51025 tool_lp: Frameworks can be created on a category level
This commit is contained in:
parent
4511b7d694
commit
2de75345bb
31 changed files with 523 additions and 409 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue