Diff for /loncom/homework/optionresponse.pm between versions 1.94 and 1.97

version 1.94, 2003/10/27 20:04:34 version 1.97, 2004/01/06 20:37:29
Line 184  sub end_foilgroup { Line 184  sub end_foilgroup {
   if ($ENV{'form.submitted'} eq 'scantron') {    if ($ENV{'form.submitted'} eq 'scantron') {
       $response = $opt[$response];        $response = $opt[$response];
   }    }
   $responsehash{$name}=$response;  
   if ( $response =~ /[^\s]/) {    if ( $response =~ /[^\s]/) {
       $responsehash{$name}=$response;
     my $value=$Apache::response::foilgroup{$name.'.value'};      my $value=$Apache::response::foilgroup{$name.'.value'};
     &Apache::lonxml::debug("submitted a $response for $value<br />\n");      &Apache::lonxml::debug("submitted a $response for $value<br />\n");
     if ($value eq $response) {      if ($value eq $response) {
Line 318  sub displayfoils { Line 318  sub displayfoils {
  } else {   } else {
     $text=$value.': '.$text;      $text=$value.': '.$text;
  }   }
       } else {
    $text='&#149;'.$text;
     }      }
     $result.=$text."\n";      $result.=$text."\n";
       } elsif ($target eq 'tex') {        } elsif ($target eq 'tex') {
Line 367  sub displayfoils { Line 369  sub displayfoils {
   my $text=$Apache::response::foilgroup{$name.'.text'};    my $text=$Apache::response::foilgroup{$name.'.text'};
   if (!($text=~s|<drawoptionlist\s*/>|$optionlist|) && $Apache::lonhomework::type ne 'exam') {    if (!($text=~s|<drawoptionlist\s*/>|$optionlist|) && $Apache::lonhomework::type ne 'exam') {
       $text=$optionlist.$text;        $text=$optionlist.$text;
     } else {
         $text='&#149;'.$text;
   }    }
   $result.=$break.$text."\n";    $result.=$break.$text."\n";
   if ($Apache::lonhomework::type eq 'exam') {    if ($Apache::lonhomework::type eq 'exam') {
Line 441  sub optionlist_correction { Line 445  sub optionlist_correction {
  $texoptionlist =~ s/>/\$>\$/g;   $texoptionlist =~ s/>/\$>\$/g;
  $texoptionlist =~ s/</\$<\$/g;   $texoptionlist =~ s/</\$<\$/g;
  $texoptionlist =~ s/=/\$=\$/g;   $texoptionlist =~ s/=/\$=\$/g;
  $texoptionlist =~ s/\^(\d+)/<m>\$$1\$<\/m>/g;   $texoptionlist =~ s/\^(\d+)/\$^{$1}\$/g;
     } else {      } else {
  $texoptionlist =~ s/<option><\/option>/\\item \[\] \\vskip -5 mm/;   $texoptionlist =~ s/<option><\/option>/\\item \[\] \\vskip -5 mm/;
     }      }

Removed from v.1.94  
changed lines
  Added in v.1.97


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