mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-52206 core: Add completion criteria to course_modules
This commit is contained in:
parent
663137748e
commit
90acd8d381
19 changed files with 113 additions and 17 deletions
|
@ -2878,5 +2878,19 @@ function xmldb_main_upgrade($oldversion) {
|
|||
upgrade_main_savepoint(true, 2021100300.01);
|
||||
}
|
||||
|
||||
if ($oldversion < 2021100300.02) {
|
||||
$table = new xmldb_table('course_modules');
|
||||
|
||||
// Adding new fields to table course_module table.
|
||||
$field = new xmldb_field('completionpassgrade', XMLDB_TYPE_INTEGER, '1', null,
|
||||
XMLDB_NOTNULL, null, '0', 'completionexpected');
|
||||
// Conditionally launch create table for course_completion_defaults.
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
upgrade_main_savepoint(true, 2021100300.02);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue