';
if (is.CRAPBrowser){OutString=ResolveAllURLs(OutString);}
//Write it to the frame
BottomFrame.document.clear();
BottomFrame.document.open();
BottomFrame.document.write(OutString);
BottomFrame.document.close();
}
function ShowAllQs(){
var Output = '';
for (var i=0; i
';
}
Output = Output + BuildQuestion(I.length-1);
Output = TableOpener + Output + TableCloser;
DisplayExercise(Output);
}
function ShowQuestion(QNum){
//First, create the Q number readout at the top
var Readout = (QNum+1) + '/' + I.length;
while (Readout.length < 7){
Readout = ' ' + Readout + ' ';
}
Readout = QButtonsOpener + Readout + QButtonsCloser;
var Output = BuildQuestion(QNum);
Output = TableOpener + Output + TableCloser;
DisplayExercise(Readout + Output);
//Mark the answers already done
for (i=0; i=0; i--){
//Find any incorrect choices
var b = eval('BottomFrame.document.QForm.A_' + QNum + '_' + i);
if (b != null){
//if it's wrong, count it
if (b.checked == true){
Status[QNum][1][i] = 'C';
}
else{
Status[QNum][1][i] = 'U';
}
if (((b.checked == true) && (b.value == "0"))||((b.checked == false)&&(b.value == "1"))){
TotWrong++;
}
}
}
if (TotWrong == 0){
Output = DefaultRight;
}
else{
Output = DefaultWrong + ' ' + (TotAns-TotWrong) + '/' + TotAns;
}
//If you haven't tried the question before
if (Status[QNum][0] == 0){
if (TotWrong > 0){
Status[QNum][2]++;
}
if (TotWrong == 0){
Status[QNum][0] = 1;
//Calculate the score for this question as a floating-point fraction of 1
Status[QNum][3] = ((Status[QNum][1].length - Status[QNum][2]) - 1) / (Status[QNum][1].length - 1);
//If less than zero, set to zero
if (Status[QNum][3] < 0){Status[QNum][3] = 0;}
}
}
//Check whether the quiz is finished
var Finished = true;
for (var i=0; i' + YourScoreIs + ' ' + Score + '%.';
}
if (Finished == true){
EraseFeedback = false;
var CFT = 0;
for (i=0; i' + CorrectFirstTime + CFT + '/' + I.length;
}
}
//Show the feedback
if (Output.length > 0){
WriteFeedback(Output);
}
}
function CheckAnswer(QNum, ANum){
var Output = I[QNum][1][ANum][1];
if (Output==''){
if (I[QNum][1][ANum][2] == 1){
Output = DefaultRight;
}
else{
Output = DefaultWrong;
}
}
//If it's not been previously answered correctly
if (Status[QNum][0] == 0){
//If it's a correct answer
if (I[QNum][1][ANum][2] == 1){
Status[QNum][0] = 1;//Mark the Q as done
Status[QNum][1][ANum] = 'R';
MarkAnswer(QNum, ANum, true);
//Calculate the score for this question as a floating-point fraction of 1
var PossibleWrongs = 0;
for (var i=0; i' + YourScoreIs + ' ' + Score + '%.';
}
if (Finished == true){
EraseFeedback = false;
var CFT = 0;
for (i=0; i' + CorrectFirstTime + CFT + '/' + I.length;
}
}
//Show the feedback
if (Output.length > 0){
WriteFeedback(Output);
}
}
function MarkAnswer(QNum, ANum, Right){
var Mark = CorrectIndicator;
if (Right == false){Mark = IncorrectIndicator;}
if (eval('BottomFrame.document.QForm.FB_' + QNum + '_' + ANum) != null){
eval('BottomFrame.document.QForm.FB_' + QNum + '_' + ANum).value = Mark;
}
}
function CheckCheckbox(QNum, ANum){
if (eval('BottomFrame.document.QForm.A_' + QNum + '_' + ANum) != null){
eval('BottomFrame.document.QForm.A_' + QNum + '_' + ANum).checked = true;
}
}
function Blank(){
return '