diff --git a/db/bolt_schema.sql b/db/bolt_schema.sql
index 18a14af39e..f1da76375c 100644
--- a/db/bolt_schema.sql
+++ b/db/bolt_schema.sql
@@ -24,9 +24,11 @@ create table bolt_enrollment (
mastery double not null
);
--- represents a view of an item;
+-- Represents a view of an item;
-- created when we show the item,
-- and finalized when the user clicks on something to leave the page
+-- A special view is used to represent the end of a course;
+-- its mode is BOLT_MODE_FINISHED.
--
create table bolt_view (
id integer not null auto_increment,
@@ -37,7 +39,7 @@ create table bolt_view (
state text not null,
-- course state
mode integer not null,
- -- distnguishes exercise show/answer
+ -- distinguishes exercise show/answer
action integer not null,
-- what the user clicked
start_time integer not null,
diff --git a/html/inc/bolt_ex.inc b/html/inc/bolt_ex.inc
index 8aedaeec22..4e196e755d 100644
--- a/html/inc/bolt_ex.inc
+++ b/html/inc/bolt_ex.inc
@@ -9,7 +9,6 @@ function bolt_exclusive_choice($choices) {
global $bolt_ex_mode; // input
global $bolt_ex_index; // input
global $bolt_ex_score; // incremental output if SCORE
- global $bolt_ex_response; // output if SCORE
switch ($bolt_ex_mode) {
case BOLT_MODE_SHOW:
@@ -31,9 +30,6 @@ function bolt_exclusive_choice($choices) {
if ($choices[$response] == $right_ans) {
$bolt_ex_score += 1;
}
- $bolt_ex_response = "$bolt_ex_index: $choices[$response]";
- } else {
- $bolt_ex_response = "";
}
break;
case BOLT_MODE_ANSWER:
@@ -64,7 +60,6 @@ function bolt_inclusive_choice($choices) {
global $bolt_ex_mode; // input
global $bolt_ex_index; // input
global $bolt_ex_score; // incremental output if SCORE
- global $bolt_ex_response; // output if SCORE
switch ($bolt_ex_mode) {
case BOLT_MODE_SHOW:
@@ -91,7 +86,6 @@ function bolt_inclusive_choice($choices) {
if ($correct) $score += 1./$n;
$i++;
}
- $bolt_ex_response = "$bolt_ex_index: $choices[$response]";
$bolt_ex_score += $score;
break;
case BOLT_MODE_ANSWER:
diff --git a/html/user/bolt_course.php b/html/user/bolt_course.php
index f397c0c284..fc35b444a0 100644
--- a/html/user/bolt_course.php
+++ b/html/user/bolt_course.php
@@ -35,15 +35,16 @@ function show_view($view) {
if ($view->result_id) {
$result = BoltResult::lookup_id($view->result_id);
- $x = "Score: $result->score
-
Answer: $result->response";
+ $qs = str_replace("action=answer", "action=answer_page", $result->response);
+ $x = "
Score: $result->score
+
Answer page";
}
echo "