mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
Make sure that the newgraded field always points to a valid state.
This commit is contained in:
parent
2e9b6d157c
commit
28a8ec9148
2 changed files with 10 additions and 0 deletions
|
@ -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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue