Skip to content

Commit

Permalink
Make sure that the newgraded field always points to a valid state.
Browse files Browse the repository at this point in the history
  • Loading branch information
gustav_delius committed Apr 30, 2006
1 parent 2e9b6d1 commit 28a8ec9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mod/quiz/db/mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,11 @@ function quiz_upgrade($oldversion) {
}
}

if ($oldversion < 2006043000) {
// The newgraded field must always point to a valid state
modify_database("","UPDATE prefix_question_sessions SET newgraded = newest where newgraded = '0'");
}

return true;
}

Expand Down
5 changes: 5 additions & 0 deletions mod/quiz/db/postgres7.php
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,11 @@ function quiz_upgrade($oldversion) {
}
}

if ($oldversion < 2006043000) {
// The newgraded field must always point to a valid state
modify_database("","UPDATE prefix_question_sessions SET newgraded = newest where newgraded = '0'");
}

return true;
}

Expand Down

0 comments on commit 28a8ec9

Please sign in to comment.