mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
I have introduced the new field $attempt->uniqueid, see http://mantis.york.ac.uk/moodle/mod/forum/discuss.php?d=852#3380
This commit is contained in:
parent
591212f69d
commit
d115d8c736
18 changed files with 70 additions and 46 deletions
|
@ -214,7 +214,10 @@ function quiz_delete_instance($id) {
|
|||
|
||||
if ($attempts = get_records("quiz_attempts", "quiz", "$quiz->id")) {
|
||||
foreach ($attempts as $attempt) {
|
||||
if (! delete_records("quiz_states", "attempt", "$attempt->id")) {
|
||||
if (! delete_records("quiz_states", "attempt", "$attempt->uniqueid")) {
|
||||
$result = false;
|
||||
}
|
||||
if (! delete_records("quiz_newest_states", "attemptid", "$attempt->uniqueid")) {
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue