## Forum archive 2000-2006

### Michael Gage - labeled_ans_rule

by Arnold Pizer -
Number of replies: 0
 labeled_ans_rule topic started 12/15/2001; 12:37:52 PMlast post 12/15/2001; 12:37:52 PM
Michael Gage - labeled_ans_rule
12/15/2001; 12:37:52 PM (reads: 1706, responses: 0)

### labeled_ans_rule

Description
This enters an answer rule attached to a specific label. This allows more control when matching student answers with answer evaluators

Syntax

labeled_ans_rule(label,width)

Params

The first parameter is the label and is required.
The second parameter is the width of the ans_rule and defaults to 20 (characters) if omitted.

Returns

The HTML (or TeX) code for an answer blank.

Examples

 BEGIN_TEXT

END_TEXT

checks that the first answer is "World" and that the second answer is numerically equivalent to 12, despite entering the answer evaluators in an order which does not match the appearance of the answer blanks.

Notes

This is essentially syntactic sugar for "NAMED_ANS_RULE". It provides a default for the width, and labeled_ans_rule seems a more descriptive title than named_answer_rule. The low level (capitalized) subroutines will retain the titles NAMED... for backward compatibility.
The labeled (or NAMED) versions of answer blanks and answer evaluators can be useful in situations where the order of the answer blanks is not obvious.