MDL-16263 A way for students to flag/bookmark, particular questions during a quiz attempt for later review.

This is an initial implementation that is now at a working state, but with a few things left to do. It seemed like a good idea to commit it before leaving work on Friday night.
This commit is contained in:
tjhunt 2008-08-29 10:08:27 +00:00
parent 57f43d239a
commit 62e76c6766
18 changed files with 340 additions and 29 deletions

View file

@ -721,6 +721,22 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint($result, 2008082602);
}
if ($result && $oldversion < 2008082700) {
/// Add a new column to the question sessions table to record whether a
/// question has been flagged.
/// Define field flagged to be added to question_sessions
$table = new xmldb_table('question_sessions');
$field = new xmldb_field('flagged', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, null, null, '0', 'manualcomment');
/// Conditionally launch add field flagged
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
/// Main savepoint reached
upgrade_main_savepoint($result, 2008082700);
}
return $result;
}