MDL-52206 core: Add completion criteria to course_modules

This commit is contained in:
Peter 2019-12-04 10:14:31 +08:00 committed by Peter Dias
parent 663137748e
commit 90acd8d381
19 changed files with 113 additions and 17 deletions

View file

@ -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;
}