Diff for /loncom/homework/radiobuttonresponse.pm between versions 1.111 and 1.112

version 1.111, 2007/02/22 01:25:31 version 1.112, 2007/03/01 02:31:20
Line 180  sub end_foilgroup { Line 180  sub end_foilgroup {
  if ( $style eq 'survey'  && $target ne 'analyze') {   if ( $style eq 'survey'  && $target ne 'analyze') {
     if ($target eq 'web' || $target eq 'tex') {      if ($target eq 'web' || $target eq 'tex') {
  $result=&displayallfoils($direction, $target);   $result=&displayallfoils($direction, $target);
    if ($target eq 'web') {
       &setup_prior_tries_hash();
    }
     } elsif ( $target eq 'answer' ) {      } elsif ( $target eq 'answer' ) {
  $result=&displayallanswers();   $result=&displayallanswers();
     } elsif ( $target eq 'grade' ) {      } elsif ( $target eq 'grade' ) {
Line 193  sub end_foilgroup { Line 196  sub end_foilgroup {
        $safeeval,'-2');         $safeeval,'-2');
     if ($target eq 'web' || $target eq 'tex') {      if ($target eq 'web' || $target eq 'tex') {
  $result=&displayfoils($target,$max,$randomize,$direction);   $result=&displayfoils($target,$max,$randomize,$direction);
    if ($target eq 'web') {
       &setup_prior_tries_hash();
    }
     } elsif ($target eq 'answer' ) {      } elsif ($target eq 'answer' ) {
  $result=&displayanswers($max,$randomize);   $result=&displayanswers($max,$randomize);
     } elsif ( $target eq 'grade') {      } elsif ( $target eq 'grade') {
Line 231  sub getfoilcounts { Line 237  sub getfoilcounts {
     return ($truecnt,$falsecnt);      return ($truecnt,$falsecnt);
 }  }
   
   sub setup_prior_tries_hash {
       my $part=$Apache::inputtags::part;
       my $id=$Apache::inputtags::response[-1];
       foreach my $i (1..$Apache::lonhomework::history{'version'}) {
    my $key = "$i:resource.$part.$id.submission";
    next if (!exists($Apache::lonhomework::history{"$key"}));
    my %response = 
       &Apache::lonnet::str2hash($Apache::lonhomework::history{$key});
    my ($name) = keys(%response);
    $Apache::inputtags::submission_display{$key} = 
       $Apache::response::foilgroup{$name.'.text'}
       }
   }
   
 sub displayallfoils {  sub displayallfoils {
     my ($direction, $target)=@_;      my ($direction, $target)=@_;
     my $result;      my $result;

Removed from v.1.111  
changed lines
  Added in v.1.112


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