mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
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:
parent
57f43d239a
commit
62e76c6766
18 changed files with 340 additions and 29 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue