mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-55956-master-5' of git://github.com/junpataleta/moodle
This commit is contained in:
commit
342af35ab8
19 changed files with 864 additions and 174 deletions
|
@ -2555,5 +2555,29 @@ function xmldb_main_upgrade($oldversion) {
|
|||
upgrade_main_savepoint(true, 2017021400.00);
|
||||
}
|
||||
|
||||
if ($oldversion < 2017030700.00) {
|
||||
|
||||
// Define field priority to be added to event.
|
||||
$table = new xmldb_table('event');
|
||||
$field = new xmldb_field('priority', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'subscriptionid');
|
||||
|
||||
// Conditionally launch add field priority.
|
||||
if (!$dbman->field_exists($table, $field)) {
|
||||
$dbman->add_field($table, $field);
|
||||
}
|
||||
|
||||
// Create adhoc task for upgrading of existing calendar events.
|
||||
$record = new \stdClass();
|
||||
$record->classname = "\\core\\task\\refresh_mod_calendar_events_task";
|
||||
$record->component = 'core';
|
||||
// Next run time based from nextruntime computation in \core\task\manager::queue_adhoc_task().
|
||||
$nextruntime = time() - 1;
|
||||
$record->nextruntime = $nextruntime;
|
||||
$DB->insert_record('task_adhoc', $record);
|
||||
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2017030700.00);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue