Diff for /loncom/homework/structuretags.pm between versions 1.22 and 1.23

version 1.22, 2000/12/15 20:31:30 version 1.23, 2000/12/19 23:22:22
Line 51  sub start_problem { Line 51  sub start_problem {
     if ( $status eq 'CLOSED' ) {      if ( $status eq 'CLOSED' ) {
       my $bodytext=&Apache::lonxml::get_all_text("/problem",$$parser[$#$parser]);        my $bodytext=&Apache::lonxml::get_all_text("/problem",$$parser[$#$parser]);
       if ( $target eq "web" ) {        if ( $target eq "web" ) {
  return "Problem is not open to be viewed. The problem $datemsg";   return "<br></br>Problem is not open to be viewed. The problem $datemsg<br></br>";
       }        }
     }       } 
   }    }
Line 210  sub start_part { Line 210  sub start_part {
   if ($target eq 'meta') {    if ($target eq 'meta') {
     return &Apache::response::mandatory_part_meta;      return &Apache::response::mandatory_part_meta;
   } else {    } else {
     my ($date,$passed) = &Apache::lonhomework::check_date("OPEN_DATE",$id);      my ($status,$datemsg) = &Apache::lonhomework::check_date("OPEN_DATE",$id);
     if ( !$passed ) {      push (@Apache::inputtags::status,$status);
       my $expression='$external::datestatus="'.$status.'";';
       $expression.='$external::gradestatus="'.$Apache::lonhomework::history{"resource.$id.solved"}.'";';
       &Apache::run::run($expression,$safeeval);
       if ( $status eq 'CLOSED' ) {
       my $bodytext=&Apache::lonxml::get_all_text("/part",$$parser[$#$parser]);        my $bodytext=&Apache::lonxml::get_all_text("/part",$$parser[$#$parser]);
       if ( $target eq "web" ) {        if ( $target eq "web" ) {
  return "Part is not open to be viewed. It opens on $date";   return "<br></br>Part is not open to be viewed. It $datemsg<br></br>";
       }        }
     }      }
   }    }
Line 224  sub start_part { Line 228  sub start_part {
 sub end_part {  sub end_part {
   my ($target,$token,$parstack,$parser,$safeeval)=@_;    my ($target,$token,$parstack,$parser,$safeeval)=@_;
   &Apache::lonxml::debug("in end_part $target ");    &Apache::lonxml::debug("in end_part $target ");
     pop @Apache::inputtags::status;
   if ( $target eq 'meta' ) { return ''; }    if ( $target eq 'meta' ) { return ''; }
   if ( $target eq 'grade' ) { return &Apaceh::inputtags::grade; }    if ( $target eq 'grade' ) { return &Apaceh::inputtags::grade; }
   return &Apache::inputtags::gradestatus($Apache::inputtags::part);    return &Apache::inputtags::gradestatus($Apache::inputtags::part);

Removed from v.1.22  
changed lines
  Added in v.1.23


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