mirror of
https://github.com/moodle/moodle.git
synced 2025-08-11 20:06:46 +02:00
MDL-3054 record the current page of a quiz attempt
This commit is contained in:
parent
60e99097e4
commit
5db8294940
6 changed files with 35 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue