Diff for /loncom/homework/inputtags.pm between versions 1.97 and 1.98

version 1.97, 2003/04/30 13:44:30 version 1.98, 2003/05/06 15:31:45
Line 33  use strict; Line 33  use strict;
 use Apache::loncommon;  use Apache::loncommon;
   
 BEGIN {  BEGIN {
   &Apache::lonxml::register('Apache::inputtags',('textfield','textline'));    &Apache::lonxml::register('Apache::inputtags',('hiddenline','textfield','textline'));
 }  }
   
   
Line 200  sub end_textline { Line 200  sub end_textline {
   return "";    return "";
 }  }
   
   sub start_hiddenline {
       my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
       my $result = "";
       if ($target eq 'web') {
    $Apache::lonxml::evaluate--;
    if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER') {
       my $partid=$Apache::inputtags::part;
       my $id=$Apache::inputtags::response[-1];
       my $oldresponse = &HTML::Entities::encode($Apache::lonhomework::history{"resource.$partid.$id.submission"});
       if ($Apache::lonhomework::type ne 'exam') {
    $result= '<input type="hidden" name="HWVAL_'.$id.'" value="'.
       $oldresponse.'" />';
       }
    }
       } elsif ($target eq 'edit') {
    $result=&Apache::edit::tag_start($target,$token);
    $result.=&Apache::edit::end_table;
       }
       return $result;
   }
   
   sub end_hiddenline {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
     if    ($target eq 'web') { $Apache::lonxml::evaluate++; }
     elsif ($target eq 'edit') { return ('','no'); }
     return "";
   }
   
 sub finalizeawards {  sub finalizeawards {
   my $result='';    my $result='';
   my $award;    my $award;
Line 350  sub decideoutput { Line 378  sub decideoutput {
   } else {    } else {
       $message = "Unknown message: $award";        $message = "Unknown message: $award";
       $button=1;        $button=1;
   }     }
   if (lc($Apache::lonhomework::problemstatus) ne 'yes') {    if (lc($Apache::lonhomework::problemstatus) eq 'no') {
       $message = "Answer Submitted";        $message = "Answer Submitted";
       $button=1;        $button=1;
   }    }

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


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