Diff for /loncom/homework/rankresponse.pm between versions 1.44 and 1.47

version 1.44, 2005/01/31 22:00:40 version 1.47, 2005/06/21 21:00:55
Line 177  sub displayanswers { Line 177  sub displayanswers {
   
 sub check_response_order {  sub check_response_order {
     my (%responsehash)=@_;      my (%responsehash)=@_;
     my @order=sort(values(%responsehash));      my @order=sort( {$a <=> $b} values(%responsehash));
     my $lastvalue=0;      my $lastvalue=0;
     my $expected=1;      my $expected=1;
     my $malformed=0;      my $malformed=0;
Line 263  sub displayfoils { Line 263  sub displayfoils {
  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);
     if ($target eq 'web') {$result.='<br />';} else {$result.=' \strut\\\\\strut ';}      if ($target eq 'web') {
     $result.=$value.':'.$text;   $result.='<br /><b>'.$value.':</b> '.$text;
       } else {
    $result.=' \strut\\\\\strut '.$value.':'.$text;
       }
  }   }
     } else {      } else {
  my $i = 0;   my $i = 0;
Line 426  sub end_foil { Line 429  sub end_foil {
     my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);      my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);
     &Apache::lonxml::debug("Got a name of :$name:");      &Apache::lonxml::debug("Got a name of :$name:");
     if (!$name) {      if (!$name) {
  &Apache::lonxml::error("Foils without names exist. This can cause problems to malfunction.");   &Apache::lonxml::warning("Foils without names exist. This can cause problems to malfunction.");
  $name=$Apache::lonxml::curdepth;   $name=$Apache::lonxml::curdepth;
     }      }
     &Apache::lonxml::debug("Using a name of :$name:");      &Apache::lonxml::debug("Using a name of :$name:");

Removed from v.1.44  
changed lines
  Added in v.1.47


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