Merge branch 'MDL-55956-master-integration' of git://github.com/junpataleta/moodle
This commit is contained in:
@@ -253,5 +253,33 @@ function xmldb_assign_upgrade($oldversion) {
|
||||
upgrade_mod_savepoint(true, 2017021500, 'assign');
|
||||
}
|
||||
|
||||
if ($oldversion < 2017031000) {
|
||||
// Set priority of assign user overrides.
|
||||
$params = [
|
||||
'modulename' => 'assign',
|
||||
'courseid' => 0,
|
||||
'groupid' => 0,
|
||||
'repeatid' => 0
|
||||
];
|
||||
$DB->set_field('event', 'priority', CALENDAR_EVENT_USER_OVERRIDE_PRIORITY, $params);
|
||||
|
||||
// Set priority for group overrides for existing assign events.
|
||||
$where = 'groupid IS NOT NULL';
|
||||
$assignoverridesrs = $DB->get_recordset_select('assign_overrides', $where, null, '', 'id, assignid, groupid, sortorder');
|
||||
foreach ($assignoverridesrs as $record) {
|
||||
$params = [
|
||||
'modulename' => 'assign',
|
||||
'instance' => $record->assignid,
|
||||
'groupid' => $record->groupid,
|
||||
'repeatid' => 0
|
||||
];
|
||||
$DB->set_field('event', 'priority', $record->sortorder, $params);
|
||||
}
|
||||
$assignoverridesrs->close();
|
||||
|
||||
// Assign savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2017031000, 'assign');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'mod_assign'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->version = 2017021500; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2017031000; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2016112900; // Requires this Moodle version.
|
||||
$plugin->cron = 60;
|
||||
|
||||
Reference in New Issue
Block a user