Diff for /loncom/homework/structuretags.pm between versions 1.154 and 1.158

version 1.154, 2003/03/06 21:05:27 version 1.158, 2003/04/02 20:52:25
Line 241  ENDCHECKOUT Line 241  ENDCHECKOUT
 sub start_problem {  sub start_problem {
   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
   
     $Apache::lonhomework::parsing_a_problem=1;
   # meta is called from lonpublisher, which doesn't uses the normal    # meta is called from lonpublisher, which doesn't uses the normal
   # lonhomework method of parsing the file which means that inputtags     # lonhomework method of parsing the file which means that inputtags 
   # won't get reset    # won't get reset
Line 253  sub start_problem { Line 254  sub start_problem {
   $Apache::inputtags::part='0';    $Apache::inputtags::part='0';
   @Apache::inputtags::responselist = ();    @Apache::inputtags::responselist = ();
   @Apache::inputtags::previous=();    @Apache::inputtags::previous=();
     @Apache::inputtags::previous_version=();
   $Apache::structuretags::printanswer='No';    $Apache::structuretags::printanswer='No';
   if ($target ne 'analyze') {    if ($target ne 'analyze') {
     &initialize_storage();      &initialize_storage();
Line 433  sub end_problem { Line 435  sub end_problem {
       # if part is zero, no <part>s existed, so we need show the current         # if part is zero, no <part>s existed, so we need show the current 
       # grading status        # grading status
       my $gradestatus = &Apache::inputtags::gradestatus($Apache::inputtags::part,$target);        my $gradestatus = &Apache::inputtags::gradestatus($Apache::inputtags::part,$target);
       if ($Apache::lonhomework::type ne 'exam') {$result.= $gradestatus;}        $result.= $gradestatus;
     }      }
     if (      if (
  (($target eq 'web') && ($ENV{'request.state'} ne 'construct')) ||   (($target eq 'web') && ($ENV{'request.state'} ne 'construct')) ||
Line 476  sub end_problem { Line 478  sub end_problem {
     &Apache::lonxml::debug("in end_problem with $target, edit");      &Apache::lonxml::debug("in end_problem with $target, edit");
     $result = &problem_edit_footer();      $result = &problem_edit_footer();
   }    }
   
     undef(%Apache::lonhomework::history);
     undef(%Apache::lonhomework::results);
     undef($Apache::inputtags::part);
     undef($Apache::lonhomework::parsing_a_problem);
   
   return $result;    return $result;
 }  }
   
Line 679  sub start_part { Line 687  sub start_part {
   $Apache::inputtags::part=$id;    $Apache::inputtags::part=$id;
   @Apache::inputtags::responselist = ();    @Apache::inputtags::responselist = ();
   @Apache::inputtags::previous=();    @Apache::inputtags::previous=();
     @Apache::inputtags::previous_version=();
   my $hidden=&Apache::loncommon::check_if_partid_hidden($Apache::inputtags::part);    my $hidden=&Apache::loncommon::check_if_partid_hidden($Apache::inputtags::part);
   
   if ($target eq 'meta') {    if ($target eq 'meta') {

Removed from v.1.154  
changed lines
  Added in v.1.158


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