Make sure that the newgraded field always points to a valid state.

This commit is contained in:
gustav_delius 2006-04-30 16:23:55 +00:00
parent 2e9b6d157c
commit 28a8ec9148
2 changed files with 10 additions and 0 deletions

View File

@ -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;
}

View File

@ -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;
}