mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
NOMDL workshop: improved SQL execution, use one query instead of loop
This commit is contained in:
parent
1149b075c7
commit
5452309a58
@ -51,9 +51,7 @@ function xmldb_workshop_upgrade($oldversion) {
|
||||
WHERE ws.id IS NULL');
|
||||
if (!empty($orphans)) {
|
||||
echo $OUTPUT->notification('Orphaned assessment records found - cleaning...');
|
||||
foreach (array_keys($orphans) as $waid) {
|
||||
$DB->delete_records('workshop_assessments', 'id', $waid);
|
||||
}
|
||||
$DB->delete_records_list('workshop_assessments', 'id', array_keys($orphans));
|
||||
}
|
||||
upgrade_mod_savepoint(true, 2007101510, 'workshop');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user