24
24
manipulation methods. More of these may be added as it
25
25
becomes necessary.
26
26
27
- Useage: $rh_ans = new AnswerHash;
27
+ Usage: $rh_ans = new AnswerHash;
28
28
29
29
AnswerEvaluator -- this class organizes the construction of
30
30
answer evaluator subroutines which check the
37
37
thus greatly reducing the programming and maintenance
38
38
required for constructing answer evaluators.
39
39
40
- Useage: $ans_eval = new AnswerEvaluator;
40
+ Usage: $ans_eval = new AnswerEvaluator;
41
41
42
42
=cut
43
43
@@ -203,14 +203,14 @@ sub setKeys {
203
203
204
204
=head4 data
205
205
206
- Useage: $rh_ans->data('foo'); set $rh_ans->{student_ans} = 'foo';
206
+ Usage: $rh_ans->data('foo'); set $rh_ans->{student_ans} = 'foo';
207
207
$student_input = $rh_ans->data(); retrieve value of $rh_ans->{student_ans}
208
208
209
209
synonym for input
210
210
211
211
=head4 input
212
212
213
- Useage: $rh_ans->input('foo') sets $rh_ans->{student_ans} = 'foo';
213
+ Usage: $rh_ans->input('foo') sets $rh_ans->{student_ans} = 'foo';
214
214
$student_input = $rh_ans->input();
215
215
216
216
synonym for data
@@ -231,7 +231,7 @@ sub input { #$rh_ans->input('foo') is a synonym for $rh_ans->{student_ans}='
231
231
232
232
=head4 input
233
233
234
- Useage: $rh_ans->score(1)
234
+ Usage: $rh_ans->score(1)
235
235
$score = $rh_ans->score();
236
236
237
237
Retrieve or set $rh_ans->{score}, the student's score on the problem.
@@ -266,7 +266,7 @@ sub stringify_hash {
266
266
267
267
=head4 throw_error
268
268
269
- Useage: $rh_ans->throw_error("FLAG", "message");
269
+ Usage: $rh_ans->throw_error("FLAG", "message");
270
270
271
271
FLAG is a distinctive word that describes the type of error.
272
272
Examples are EVAL for an evaluation error or "SYNTAX" for a syntax error.
@@ -279,7 +279,7 @@ sub stringify_hash {
279
279
280
280
=head4 catch_error
281
281
282
- Useage: $rh_ans->catch_error("FLAG2");
282
+ Usage: $rh_ans->catch_error("FLAG2");
283
283
284
284
Returns true (1) if $rh_ans->{error_flag} equals "FLAG2", otherwise it returns
285
285
false (empty string).
@@ -288,7 +288,7 @@ sub stringify_hash {
288
288
289
289
=head4 clear_error
290
290
291
- Useage: $rh_ans->clear_error("FLAG2");
291
+ Usage: $rh_ans->clear_error("FLAG2");
292
292
293
293
If $rh_ans->{error_flag} equals "FLAG2" then the {error_flag} entry is set to
294
294
the empty string as is the entry {error_message}
@@ -297,7 +297,7 @@ sub stringify_hash {
297
297
298
298
=head4 error_message
299
299
300
- Useage: $flag = $rh_ans -> error_flag();
300
+ Usage: $flag = $rh_ans -> error_flag();
301
301
302
302
$message = $rh_ans -> error_message();
303
303
@@ -352,7 +352,7 @@ sub error_message {
352
352
# =head4 pretty_print
353
353
#
354
354
#
355
- # Useage: $rh_ans -> pretty_print();
355
+ # Usage: $rh_ans -> pretty_print();
356
356
#
357
357
#
358
358
# Returns a string containing a representation of the AnswerHash as an HTML table.
@@ -396,7 +396,7 @@ sub error_message {
396
396
397
397
=head4 OR
398
398
399
- Useage: $rh_ans->OR($rh_ans2);
399
+ Usage: $rh_ans->OR($rh_ans2);
400
400
401
401
Returns a new AnswerHash whose score is the maximum of the scores in $rh_ans and $rh_ans2.
402
402
The correct answers for the two hashes are combined with "OR".
@@ -408,7 +408,7 @@ sub error_message {
408
408
=head4 AND
409
409
410
410
411
- Useage: $rh_ans->AND($rh_ans2);
411
+ Usage: $rh_ans->AND($rh_ans2);
412
412
413
413
Returns a new AnswerHash whose score is the minimum of the scores in $rh_ans and $rh_ans2.
414
414
The correct answers for the two hashes are combined with "AND".
@@ -817,7 +817,7 @@ sub rh_ans {
817
817
A filter is a subroutine which takes one AnswerHash as an input, followed by
818
818
a hash of options.
819
819
820
- Useage: filter($ans_hash, option1 =>value1, option2=> value2 );
820
+ Usage: filter($ans_hash, option1 =>value1, option2=> value2 );
821
821
822
822
823
823
The filter performs some operations on the input AnswerHash and returns an
0 commit comments