if ($oldversion < 2004010100) {
table_column("choice", "", "showunanswered", "integer", "4", "unsigned", "0", "", "publish");
}
+ if ($oldversion < 2004021700) {
+ modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose', 'choice', 'name');");
+ modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose again', 'choice', 'name');");
+ }
return true;
}
INSERT INTO prefix_log_display VALUES ('choice', 'update', 'choice', 'name');\r
INSERT INTO prefix_log_display VALUES ('choice', 'add', 'choice', 'name');\r
INSERT INTO prefix_log_display VALUES ('choice', 'report', 'choice', 'name');\r
-\r
- \r
+INSERT INTO prefix_log_display VALUES ('choice', 'choose', 'choice', 'name');\r
+INSERT INTO prefix_log_display VALUES ('choice', 'choose again', 'choice', 'name');\r
\r
\r
if ($oldversion < 2004010100) {
table_column("choice", "", "showunanswered", "integer", "4", "unsigned", "0", "", "publish");
}
+ if ($oldversion < 2004021700) {
+ modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose', 'choice', 'name');");
+ modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose again', 'choice', 'name');");
+ }
return true;
}
INSERT INTO prefix_log_display VALUES ('choice', 'update', 'choice', 'name');
INSERT INTO prefix_log_display VALUES ('choice', 'add', 'choice', 'name');
INSERT INTO prefix_log_display VALUES ('choice', 'report', 'choice', 'name');
-
-
-
+INSERT INTO prefix_log_display VALUES ('choice', 'choose', 'choice', 'name');
+INSERT INTO prefix_log_display VALUES ('choice', 'choose again', 'choice', 'name');
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2004013101;
+$module->version = 2004021700;
$module->requires = 2004013101; // Requires this Moodle version
$module->cron = 0;
if (! update_record("choice_answers", $newanswer)) {
error("Could not update your choice");
}
- add_to_log($course->id, "choice", "update", "view.php?id=$cm->id", $choice->id, $cm->id);
+ add_to_log($course->id, "choice", "choose again", "view.php?id=$cm->id", $choice->id, $cm->id);
} else {
$newanswer->choice = $choice->id;
$newanswer->userid = $USER->id;
if (! insert_record("choice_answers", $newanswer)) {
error("Could not save your choice");
}
- add_to_log($course->id, "choice", "add", "view.php?id=$cm->id", $choice->id, $cm->id);
+ add_to_log($course->id, "choice", "choose", "view.php?id=$cm->id", $choice->id, $cm->id);
}
}
redirect("$CFG->wwwroot/course/view.php?id=$course->id");