MDL-3054 record the current page of a quiz attempt

This commit is contained in:
Charles Fulton 2012-01-08 14:14:09 -08:00
parent 60e99097e4
commit 5db8294940
6 changed files with 35 additions and 4 deletions

View file

@ -69,6 +69,18 @@ function xmldb_quiz_upgrade($oldversion) {
// quiz savepoint reached
upgrade_mod_savepoint(true, 2011120701, 'quiz');
}
if ($oldversion < 2011120703) {
// Track page of quiz attempts
$table = new xmldb_table('quiz_attempts');
$field = new xmldb_field('currentpage', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0);
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
upgrade_mod_savepoint(true, 2011120703, 'quiz');
}
return true;
}