The -judge- Command
We have encountered the regular command -judge- (not a judging command) and have seen how it can be used to âjudge wrongâ a response that had already received an âokâ judgment. The -judgecommand may also be used to âjudge okâ a response (disregarding what a previous judging command may have had to say). The following is a conditional form for this type of -judge- command:
This form will either make the judgment âokâ, leave the current judgment as is (the âxâ option), or make the judgment âwrongâ, depending on the condition â3a-bâ.
Here is a useful example:
We could just as well have written âjudge num<O,x,wrongâ since the original judgment was a universal âokâ. (Later we will study -ansv- and -wrongv- which are also useful in numerical judging.) Note that âjudge okâ and âjudge wrongâ do not cut off the following commands. In the above example, the -writec- is performed, even though it follows the -judge- command. The -judge- command here merely alters the judgment. If you want to cut off the following commands, you can use âjudge okquitâ or âjudge noquitâ.
We have been using the -ok- or -no- commands to terminate judging unconditionally, as in the last example. It is sometimes useful to be able to switch in the other direction, from the regular state to the judging state. For example, suppose you want to count the number of attempts the student makes to satisfy the -arrow-:
Judging starts just after the -arrow-. The -ok- terminates judging to permit executing the regular -calc- which increments the âattemptâ counter. Then the regular -judge- command says âcontinue judgingâ, which switches TUTOR back into the judging state to examine the -answer- and other judging commands which follow. If the response is finally judged ânoâ, the student will respond again, and since judging starts each time from the -arrow-, the âattemptâ counter will record each try. (Actually, system variable ântriesâ automatically counts the number of tries, but structures similar to the structure illustrated here are often useful.)
Leaving out the -ok- and âjudge continueâ (which permit counting each attempt) is a common mistake. If you write:
then âattemptâ will stop at one. TUTOR initializes âattemptâ to 0, then encounters the -arrow- and notes its position in the unit. Then, the following -calc- increments âattemptâ to 1, after which the -answerjudging command terminates this regular processing to await the student's response. The student then enters his or her response and TUTOR starts judging. The first command after the -arrow- is the incrementing -calc-, which is skipped because it is a regular command and TUTOR is looking for judging commands. This will happen on each response entry, so âattemptâ never gets larger than one. This explains the importance of bracketing the -calc- with -ok- and âjudge continueâ.
A related option is âjudge rejudgeâ which is similar to âjudge continueâ. We have seen that âspecs bumpshiftâ alters the âjudging copyâ of the response by knocking out the shift characters. The judging copy is the version of the response which is examined by the judging commands (such as -answer-). This version may differ from the student's actual response due to various operations such as âspecs bumpshiftâ. It is also possible to -bump- other characters or to -put- one string of characters in place of another. All such operations affect the judging copy only and do not touch the original response, which remains unmodified. The statement âjudge rejudgeâ replaces the judging copy of the response with the original response, thus cancelling the effects of any previous modifications of the judging copy. The statement also initializes the system variables associated with judging, including âanscntâ. It is, therefore, much more drastic than âjudge continueâ, which merely switches TUTOR to the judging state without affecting the judging copy or the system variables.
Another exceedingly useful -judge- option is âjudge ignoreâ which erases the student's response from the screen and permits him or her to type another response without first having to use NEXT or ERASE. Unlike âjudge wrongâ, âokâ, or âcontinueâ, âjudge ignoreâ stops all processing and waits for new student input. (Even the commands following a -specs- won't be performed.) On the other hand, TUTOR goes on to the following commands after processing -judge- with tags âokâ, âwrongâ, or âcontinueâ.
The following routine (which permits the student to move a cursor on the screen) is a good example of the heightened interaction made possible through the use of âjudge ignoreâ. We use the typewriter keys d,e,w,q,a,z,x, and c which are clustered around a 3 key by 3 key square on the keyboard, to indicate the eight compass directions for the cursor to move on the screen. These keys (shown in Fig. 7-2) have small arrows on them to indicate their common use for moving a cursor.
This routine permits the student to move the cursor rapidly in any direction on the screen. A letter which matches one of the -answerstatements will cause the -calcs- statements to update x and y appropriately to move in one of the eight compass directions. The âlong 1â makes it unnecessary to press NEXT to initiate judging, and the âjudge ignoreâ after the replotting of the cursor again leaves TUTOR awaiting a new response. The âjudge ignoreâ greatly simplifies repetitive response handling such as that which arises in this example. Normally, such a cursor-moving routine would be associated with options to perform some action, such as drawing a line. This would make it possible for the student to draw figures on the screen.
In addition to the -judge- options discussed above, there is a âjudge exitâ which throws away the NEXT or timeup key that had initated judging. This leaves the student in a state to type another letter on the end of his or her response. This can be used to achieve special timing and animation effects.
To summarize, the -judge- command is a regular command used for controlling various judging aspects. The -ok-, -no-, and -ignore- are judging commands which somewhat parallel the âjudge okâ, âjudge noâ, and âjudge ignoreâ options. The âjudge rejudgeâ and âjudge continueâ options make it possible to switch from the regular state to the judging state (with or without reinitializing the judging copy of the student response and the system variables associated with judging). All of these options may appear in a conditional -judge- with âxâ meaning âdo nothingâ:
The subtle difference between âjudge wrongâ and âjudge noâ will be discussed in Chapter 12 in the section on âStudent Response Dataâ. Basically, âjudge wrongâ is used to indicate an anticipated (specific) wrong response, whereas âjudge noâ indicates an unanticipated student response. Additional -judge- options are âquitâ, âokquitâ, and ânoquitâ.