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:
gustav_delius 2005-07-02 18:14:51 +00:00
parent 591212f69d
commit d115d8c736
18 changed files with 70 additions and 46 deletions

View file

@ -50,7 +50,7 @@
// Moodle 1.5 model (they will not yet have the timestamp set)
if ($attempts = get_records_sql("SELECT a.*".
" FROM {$CFG->prefix}quiz_attempts a, {$CFG->prefix}quiz_states s".
" WHERE a.quiz = '$quiz->id' AND s.attempt = a.id AND s.timestamp = 0")) {
" WHERE a.quiz = '$quiz->id' AND s.attempt = a.uniqueid AND s.timestamp = 0")) {
foreach ($attempts as $attempt) {
quiz_upgrade_states($attempt);
}