Diff for /loncom/homework/optionresponse.pm between versions 1.137 and 1.138

version 1.137, 2007/02/22 01:25:31 version 1.138, 2007/03/01 02:33:28
Line 355  sub check_for_invalid { Line 355  sub check_for_invalid {
     }      }
 }  }
   
   sub setup_prior_tries_hash {
       my ($whichopt) = @_;
       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 %lastresponse=
       &Apache::lonnet::str2hash($Apache::lonhomework::history{$key});
    my $output;
    foreach my $name (@$whichopt) {
       next if (!defined($lastresponse{$name}));
       $output .= '<td>'.$lastresponse{$name}.'</td>';
    }
    next if (!defined($output));
    $output =
       '<table class="LC_optres_prior"><tr>'.$output.'</tr></table>';
    $Apache::inputtags::submission_display{$key} = $output;
       }
   }
   
 sub displayfoils {  sub displayfoils {
   my ($target,$max,$randomize,$TeXlayout,@opt)=@_;    my ($target,$max,$randomize,$TeXlayout,@opt)=@_;
   if (!defined(@{ $Apache::response::foilgroup{'names'} })) {return;}    if (!defined(@{ $Apache::response::foilgroup{'names'} })) {return;}
Line 475  sub displayfoils { Line 496  sub displayfoils {
       }        }
     }      }
   }    }
   
     if ($target eq 'web') {
         &setup_prior_tries_hash(\@whichopt);
     }
   
   if ($target ne 'tex') {    if ($target ne 'tex') {
       return $result.$break;        return $result.$break;
   } else {    } else {

Removed from v.1.137  
changed lines
  Added in v.1.138


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