Diff for /loncom/homework/rankresponse.pm between versions 1.16 and 1.21

version 1.16, 2003/07/16 13:14:12 version 1.21, 2003/10/13 19:25:30
Line 121  sub get_correct_order { Line 121  sub get_correct_order {
     }      }
     @value_names =      @value_names =
  sort {   sort {
     if (abs($a->[0] - $b->[0]) > $tol) {return ($a->[0] cmp $b->[0]);}      if (abs($a->[0] - $b->[0]) > $tol) {return ($a->[0] <=> $b->[0]);}
     return 0;      return 0;
  } @value_names;   } @value_names;
     my @value_names_tmp=@value_names;      my @value_names_tmp=@value_names;
Line 238  sub displayfoils { Line 238  sub displayfoils {
     my (@whichfoils)=&whichfoils($max,$randomize);      my (@whichfoils)=&whichfoils($max,$randomize);
     my $part=$Apache::inputtags::part;      my $part=$Apache::inputtags::part;
     my $solved=$Apache::lonhomework::history{"resource.$part.solved"};      my $solved=$Apache::lonhomework::history{"resource.$part.solved"};
     my $status=$Apache::inputtags::status[-1];  
     my @whichopt=(1..($#whichfoils+1));      my @whichopt=(1..($#whichfoils+1));
     my @correctorder=&get_correct_order($tol,@whichfoils);      my @correctorder=&get_correct_order($tol,@whichfoils);
     if (($solved =~ /^correct/) || ($status eq  'SHOW_ANSWER')) {      if ( &Apache::response::show_answer() && ($target ne 'tex')) {
  foreach my $name (@whichfoils) {   foreach my $name (@whichfoils) {
     my $text=$Apache::response::foilgroup{$name.'.text'};      my $text=$Apache::response::foilgroup{$name.'.text'};
     my $value=shift(@correctorder);      my $value=shift(@correctorder);
     $result.='<br />'.$value.':'.$text;      if ($target eq 'web') {$result.='<br />';} else {$result.=' \strut\\\\\strut ';}
       $result.=$value.':'.$text;
  }   }
     } else {      } else {
  my $i = 0;   my $i = 0;

Removed from v.1.16  
changed lines
  Added in v.1.21


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>