[system] / trunk / pg / macros / answerComposition.pl Repository:
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 5053 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.5053  
changed lines
  Added in v.5054

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9