HomeCurrent UR
|
Managing answersOverviewThree aspects of answers need to be coordinated:
The answer blank and the answer_evaluator are matched by their labels. There is a provision for implicitly generating labels according to the order in which the answer blanks and answer evaluators are entered, but this is not required. The answer blank and the response to the answer blank always occur in the same order, the order in which the answer blanks are rendered, which is stored in the flag Answer blank labelsEvery answer blank has a label. When the answer blank is rendered the label is registered in a queue and is also rendered into the HTML form. Radio buttons and check forms have auxiliary parts (options) which can be printed separately in different parts of the form. Only one of them registers a label. For example: NAMED_ANS_RADIO('answer1'...) will register the label 'answer1' and print a labeled radio button. NAMED_ANS_RADIO_OPTION('answer1',...) ,however,will print a radio button, but will not register a new label. Keeping the labels unique is the responsibility of the author. No checking is done. The second answer with the same name will overwrite the first. Order of entryWeBWorK responds to each answer in the order in which the answer blank appears in the form. This is accomplished using the answer label queue. This coordinates the answer blanks and the order in which the answer responses appear when WeBWorK responds. The answers are also evaluated in this order, (the order the answer blanks are rendered), although it may be a bit unreliable to try to rely on this order of evaluation. In general I think it is better if answers are independent of each other in order to minimize surprises when an instructor modifies a question. Matching labelsThe answer blanks and the answer_evaluators are matched by their labels. The order in which answer_evaluators are processed depends on the order of entry of the answer blanks, not on the order of entry of the answer_evaluators. (But see implicit labeling below.) This method allows storing answer_evaluators in any order, which may occasionally be convenient. Implicit labelingThe most common way of entering answer blanks and answer evaluators also depends on the order of entry: Answer blanks without labels and answer_evaluators without labels are stored in the order they are processed on the problem template form and then provided with labels which identify them with each other by the These implicitly defined labels all begin with something obscure like AnSwEr... (a prefix which can be set in PG.pl.) Explicitly labeled answer blanks should avoid using this prefix. Processing answersAll code outside of the PG language sees every answer blank and every answer_evaluator as labeled. These labeled answer blanks and answer_evaluators and the array storing the order in which the answer blanks were rendered, completely determine how the answers will be evaluated. The answer labels themselves are never sorted, and any unique alphanumeric identifiers can be used. MacrosAnswer_evaluators
Answer blanksAnswer rules family ( a single line of text)
Area text answers
Radio button answersThe design is not yet finalized. Check box answersThe design is not yet finalized.
|
||
Last update: Wednesday, January 10, 2007 at 10:10:33 PM.
This site maintained using Manila and Frontier software. |
|||