Forum archive 2000-2006

Michael Gage - LABELED_ANS

Michael Gage - LABELED_ANS

by Arnold Pizer -
Number of replies: 0
inactiveTopicLABELED_ANS topic started 12/15/2001; 12:21:15 PM
last post 12/15/2001; 12:21:15 PM
userMichael Gage - LABELED_ANS  blueArrow
12/15/2001; 12:21:15 PM (reads: 1710, responses: 0)

LABELED_ANS

Description
This method for entering instructor's "answer evaluators" provides more control than the standard ANS method.

Syntax

LABELED_ANS(label1=>answer_evaluator1, label2=>answer_evaluator2, ...)

Params

A list of lable/answer_evaluator pairs.

Action

Places the answer evaluators in the labeled answer_evaluator queue. They will be paired with labeled answer rules (answer entry blanks labeled_ans_rule()) by matching the labels.

Returns

Nothing

Examples


BEGIN_TEXT
Complete the sentence. Hello \{labeled_ans_rule("string_answer",20)\}
4+8 = \{labeled_ans_rule("numerical_answer"\}

END_TEXT
LABELED_ANS( "numerical_answer" => num_cmp(12),"string_answer" => str_cmp("World"));

checks that the first answer is "World" and that the second answer is numerically equivalent to 12 despite the fact that they were not entered in that order.

See Also

ANS, labeled_ans_rule, str_cmp, num_cmp (and Managing answers for more details)

Macro Definition File

PG.pl

 

<| Post or View Comments |>