mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-70781 course: setting for displaying completion conditions
Part of MDL-70817
This commit is contained in:
parent
c0d0679c8a
commit
a4f7c1d91f
7 changed files with 44 additions and 1 deletions
|
@ -2531,5 +2531,19 @@ function xmldb_main_upgrade($oldversion) {
|
|||
upgrade_main_savepoint(true, 2021052500.74);
|
||||
}
|
||||
|
||||
if ($oldversion < 2021052500.75) {
|
||||
// Define field 'showcompletionconditions' to be added to course.
|
||||
$table = new xmldb_table('course');
|
||||
$field = new xmldb_field('showcompletionconditions', XMLDB_TYPE_INTEGER, '1', null,
|
||||
XMLDB_NOTNULL, null, '1', 'completionnotify');
|
||||
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2021052500.75);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue