| 1 | #!/usr/bin/perl -w |
1 | #!/usr/bin/perl -w |
| 2 | #Construct for matching list. |
2 | #Construct for matching list. |
| 3 | #Inherits from List.pm |
3 | #Inherits from List.pm |
| 4 | #VS 6/16/2000 |
4 | #VS 6/16/2000 |
| 5 | |
|
|
| 6 | =pod |
|
|
| 7 | |
5 | |
| 8 | =head1 NAME |
6 | =head1 NAME |
| 9 | |
7 | |
| 10 | Match.pm -- sub-class of List that implements a matching list. |
8 | Match.pm -- sub-class of List that implements a matching list. |
| 11 | |
9 | |
| … | |
… | |
| 152 | |
150 | |
| 153 | If you want you can change the size of the answer boxes at any time (the default is 4). |
151 | If you want you can change the size of the answer boxes at any time (the default is 4). |
| 154 | |
152 | |
| 155 | =for html |
153 | =for html |
| 156 | <PRE> |
154 | <PRE> |
| 157 | <I>$ml->ans_rule_len = 10;</I></PRE> |
155 | <I>$ml->ans_rule_len(10);</I></PRE> |
| 158 | |
156 | |
| 159 | Now you would start your problem with a BEGIN_TEXT tag and print the questions |
157 | Now you would start your problem with a BEGIN_TEXT tag and print the questions |
| 160 | and answers with the print_q() and print_a() commands. Within the |
158 | and answers with the print_q() and print_a() commands. Within the |
| 161 | BEGIN_TEXT/END_TEXT block, all calls to objects must be enclosed in \( \). |
159 | BEGIN_TEXT/END_TEXT block, all calls to objects must be enclosed in \( \). |
| 162 | (The $PAR start a new paragraph by printing a blank line). |
160 | (The $PAR start a new paragraph by printing a blank line). |
| … | |
… | |
| 182 | =cut |
180 | =cut |
| 183 | |
181 | |
| 184 | BEGIN { |
182 | BEGIN { |
| 185 | be_strict(); |
183 | be_strict(); |
| 186 | } |
184 | } |
| 187 | #' |
185 | |
| 188 | |
186 | |
| 189 | package Match; |
187 | package Match; |
| 190 | |
188 | |
| 191 | #require "${Global::mainDirectory}courseScripts/List.pm"; |
|
|
| 192 | @Match::ISA = qw( List ); |
189 | @Match::ISA = qw( List ); |
| 193 | |
190 | |
| 194 | # *** Subroutines which overload List.pm *** |
191 | # *** Subroutines which overload List.pm *** |
| 195 | |
192 | |
| 196 | #sends letters for comparison instead of actual answers |
193 | #sends letters for comparison instead of actual answers |