[system] / trunk / pg / macros / answerComposition.pl Repository: Repository Listing bbplugincoursesdistsnplrochestersystemwww

# Diff of /trunk/pg/macros/answerComposition.pl

Revision 4997 Revision 5054
119 my (\$i,\$error); 119 my (\$i,\$error);
120 120
121 # 121 #
122 # Get correct answer data and determine which variables to use 122 # Get correct answer data and determine which variables to use
123 # 123 #
124 \$f = Value::Formula->new(\$f); \$g = Value::Formula->new(\$g); 124 \$f = Value->Package("Formula")->new(\$f); \$g = Value->Package("Formula")->new(\$g);
125 my %correct = (\$fID => \$f, \$gID => \$g); 125 my %correct = (\$fID => \$f, \$gID => \$g);
126 my %x = (\$fID => \$vars->[0], \$gID => \$vars->[1]); 126 my %x = (\$fID => \$vars->[0], \$gID => \$vars->[1]);
127 foreach \$i (@IDs) { 127 foreach \$i (@IDs) {
128 unless (\$x{\$i}) { 128 unless (\$x{\$i}) {
129 die "Can't tell which variable to use for \$correct{\$i}: ". 129 die "Can't tell which variable to use for \$correct{\$i}: ".
180 if (\$student{\$i} == \$x{\$i}) { 180 if (\$student{\$i} == \$x{\$i}) {
181 \$ans{\$i}->{rh_ans}{ans_message} = "The identity function is not allowed" 181 \$ans{\$i}->{rh_ans}{ans_message} = "The identity function is not allowed"
182 unless \$isPreview; 182 unless \$isPreview;
183 \$error = 1; next; 183 \$error = 1; next;
184 } 184 }
185 185
186 } 186 }
187 187
188 # 188 #
189 # If no error, and both answers are given, check if compositions are equal 189 # If no error, and both answers are given, check if compositions are equal
190 # 190 #

Legend:
 Removed from v.4997 changed lines Added in v.5054

 aubreyja at gmail dot com ViewVC Help Powered by ViewVC 1.0.9