put "You scored" && gScore && "correct on the first try" && "out of a total of" && gTotQuiz && "questions, or" && userScore & "%." & RETURN & RETURN into field "results"
if userScore >= gPassingScore then
put "Since you exceeded " & gPassingScore & "%, you have passed the requirements" && "for this quiz." & RETURN & RETURN & "CONGRATULATIONS!" & RETURN & RETURN & "Are you ready to receive your certificate?" after field "results"
else
put "Since you scored less than " & gPassingScore & "%, you should review the information" && "for this unit. You may now redo the self check (click on the arrow button)" & RETURN & "----------------" & RETURN & "TOPICS to REVIEW" & RETURN & "(You may wish to write down the topics you missed)" & RETURN & RETURN after field "results"
repeat with i in gMissed
put " *" && i & RETURN after field "results"
end repeat
end if
put EMPTY before line 1 of field "results"
set cursor to -1
go("results")
end
on shuffleAnswers
set answerOrder to the randomList of birth(script "randmother", 4)
repeat with i = 1 to 4
set the locH of sprite (getAt(answerOrder, i) + 1) to 5
set the locV of sprite (getAt(answerOrder, i) + 1) to 70 + (30 * value(i))
end repeat
end
on animQuestionMark spriteNum, firstCast, lastCast, hOffset
global gAnimDirection
if the castNum of sprite spriteNum = lastCast then
set gAnimDirection to -1
else
if the castNum of sprite spriteNum = firstCast then
set gAnimDirection to 1
end if
end if
set the castNum of sprite spriteNum to the castNum of sprite spriteNum + gAnimDirection
set the locH of sprite spriteNum to the locH of sprite spriteNum + hOffset
if the locH of sprite spriteNum > 500 then
set the locH of sprite spriteNum to -100
end if
set the locV of sprite spriteNum to 150 + integer(50 * sin(the locH of sprite spriteNum * PI / 112))
set the foreColor of sprite spriteNum to random(256)
updateStage()
end
on currQuestionInfo
global gQuizList
return the quizParam of getAt(gQuizList, currQuestionNumber())
end
on currQuestionNumber
global gQuizOrder
return getAt(the randomList of gQuizOrder, the currentItem of gQuizOrder)