mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-68733 quiz editing: be more careful deleting random question tags
This commit is contained in:
parent
c689726d3f
commit
9024289626
@ -149,7 +149,7 @@ if ($mform->is_cancelled()) {
|
||||
// Now, delete the remaining records.
|
||||
if (!empty($recordstokeep)) {
|
||||
list($select, $params) = $DB->get_in_or_equal($recordstokeep, SQL_PARAMS_QM, 'param', false);
|
||||
$DB->delete_records_select('quiz_slot_tags', "id $select", $params);
|
||||
$DB->delete_records_select('quiz_slot_tags', "slotid = {$slot->id} AND id $select", $params);
|
||||
} else {
|
||||
$DB->delete_records('quiz_slot_tags', array('slotid' => $slot->id));
|
||||
}
|
||||
|
@ -2580,7 +2580,7 @@ function quiz_retrieve_tags_for_slot_ids($slotids) {
|
||||
}
|
||||
}
|
||||
|
||||
$carry[$slottag->slotid][] = $slottag;
|
||||
$carry[$slottag->slotid][$slottag->id] = $slottag;
|
||||
return $carry;
|
||||
},
|
||||
$emptytagids
|
||||
|
Loading…
x
Reference in New Issue
Block a user