mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +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
|
@ -31,9 +31,9 @@
|
|||
if (! $attempt = get_record('quiz_attempts', 'id', $attemptid)) {
|
||||
error('No such attempt ID exists');
|
||||
}
|
||||
if (! $neweststateid = get_field('quiz_newest_states', 'newest', 'attemptid', $attemptid, 'questionid', $questionid)) {
|
||||
if (! $neweststateid = get_field('quiz_newest_states', 'newest', 'attemptid', $attempt->uniqueid, 'questionid', $questionid)) {
|
||||
// newest_state not set, probably because this is an old attempt from the old quiz module code
|
||||
if (! $state = get_record('quiz_states', 'question', $questionid, 'attempt', $attemptid)) {
|
||||
if (! $state = get_record('quiz_states', 'question', $questionid, 'attempt', $attempt->uniqueid)) {
|
||||
error('Invalid question id');
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue