$choice\n";
$i++;
}
$bolt_ex_state = $seed;
break;
case BOLT_MODE_SCORE:
$seed = $bolt_ex_state;
srand($seed);
$right_ans = $choices[0];
shuffle($choices);
$response = $_GET["q_$bolt_ex_index"];
if ($choices[$response] == $right_ans) {
$bolt_ex_score = 1;
} else {
$bolt_ex_score = 0;
}
echo "FOO";
break;
case BOLT_MODE_ANSWER:
$seed = $bolt_ex_state;
srand($seed);
$right_ans = $choices[0];
shuffle($choices);
$response = $_GET["q_$bolt_ex_index"];
$i = 0;
foreach ($choices as $choice) {
echo "
$choice";
if ($response == $i) echo "You chose this";
if ($choice == $right_ans) echo "Right answer";
$i++;
}
break;
}
$bolt_ex_index++;
}
?>