Applied fixes from bug 4319. Thanks to Jaroslav
This commit is contained in:
@@ -666,6 +666,7 @@ function quiz_upgrade($oldversion) {
|
||||
$multianswers[$i]->length = 0;
|
||||
$multianswers[$i]->questiontext = '';
|
||||
$multianswers[$i]->stamp = make_unique_id_code();
|
||||
$multianswers[$i]->name = addslashes($multianswers[$i]->name);
|
||||
// $multianswers[$i]->parent is set in the query
|
||||
// $multianswers[$i]->defaultgrade is set in the query
|
||||
// $multianswers[$i]->qtype is set in the query
|
||||
|
||||
@@ -474,7 +474,7 @@ function quiz_upgrade_states($attempt) {
|
||||
// used by a RANDOM question
|
||||
$newest->attemptid = $attempt->uniqueid;
|
||||
$questionlist = quiz_questions_in_quiz($attempt->layout);
|
||||
if ($states = get_records_select('quiz_states', "attempt = '$attempt->uniqueid' AND question IN ($questionlist)")) {
|
||||
if ($questionlist and $states = get_records_select('quiz_states', "attempt = '$attempt->uniqueid' AND question IN ($questionlist)")) {
|
||||
foreach ($states as $state) {
|
||||
$session->newgraded = $state->id;
|
||||
$session->newest = $state->id;
|
||||
|
||||
Reference in New Issue
Block a user