• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 2. The Online Test > administer.html

2.5. administer.html

The objects are now in place. Let's put them to work for us. This is another application where the JavaScript brains reside in the upper frame, and the lower frame is used for interaction. You can break down the application into a series of processes. Table 2.1 lists and describes these processes and includes the JavaScript variables and functions associated with each.

Table 2.1. Test Processes and Associated JavaScript Functions
Process Description Associated JavaScript
Setting the environment Declare and initialize global variables, shuffle the question-answer sets. variables qIdx, correct, howMany, stopOK, nextQ, results, aFrame, qFrame

arrays keeper, rank, questions, answers

functions itemReset(), shuffle()
Administering the test Write each question-answer set to the window, record each user choice. functions buildQuestion(), makeButton(), possibly chickenOut()
Grading the test Compare student answers with correct answers. function gradeTest()
Printing out results Print out all answers, right and wrong, to the window along with a ranking. function printResults()
Displaying explanations Printing and clearing explanations to parent.frame[1]. functions explain() and show().
Resetting the environment Set all necessary variables to their original values. variables qIdx, correct, stopOK

array keeper

functions cleanSlate(), shuffle()



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint