Diff for /loncom/homework/structuretags.pm between versions 1.141 and 1.142

version 1.141, 2002/12/05 14:37:17 version 1.142, 2002/12/05 22:59:37
Line 305  sub start_problem { Line 305  sub start_problem {
     &Apache::lonxml::debug("Got $status");      &Apache::lonxml::debug("Got $status");
     if (( $status eq 'CLOSED' ) ||      if (( $status eq 'CLOSED' ) ||
         ( $status eq 'UNCHECKEDOUT') ||          ( $status eq 'UNCHECKEDOUT') ||
         ( $status eq 'BANNED')) {          ( $status eq 'BANNED') ||
           ( $status eq 'UNAVAILABLE')) {
       my $bodytext=&Apache::lonxml::get_all_text("/problem",$parser);        my $bodytext=&Apache::lonxml::get_all_text("/problem",$parser);
       if ( $target eq "web" ) {        if ( $target eq "web" ) {
  $result.= $head_tag_start.'</head>';   $result.= $head_tag_start.'</head>';
         my $msg=$body_tag_start.          my $msg=$body_tag_start;
     '<h1>Not open to be viewed</h1>';   if ($status eq 'UNAVAILABLE') {
       $result.='<h1>Unable to determine if this resource is open due to network problems. Please try again later.</h1>';
    } else {
       $result.='<h1>Not open to be viewed</h1>';
    }
         if ($status eq 'CLOSED') {          if ($status eq 'CLOSED') {
     $msg.='The problem '.$accessmsg;      $msg.='The problem '.$accessmsg;
  } elsif ($status eq 'UNCHECKEDOUT') {   } elsif ($status eq 'UNCHECKEDOUT') {
Line 318  sub start_problem { Line 323  sub start_problem {
         }          }
  $result.=$msg.'<br />';   $result.=$msg.'<br />';
       } elsif ($target eq 'tex') {        } elsif ($target eq 'tex') {
   $result.="\\begin{document}\\noindent \\vskip 1 mm \\begin{minipage}{\\textwidth}\\vskip 0 mm Problem is not open to be viewed. It $accessmsg \\vskip 0 mm ";    $result.="\\begin{document}\\noindent \\vskip 1 mm \\begin{minipage}{\\textwidth}\\vskip 0 mm ";
       }    if ($status eq 'UNAVAILABLE') {
       $result.='Unable to determine if this resource is open due to network problems. Please try again later.\vskip 0 mm ';
    } else {
       $result.="Problem is not open to be viewed. It $accessmsg \\vskip 0 mm ";
    }
         }
     } elsif ($target eq 'web') {      } elsif ($target eq 'web') {
       my $name= &get_resource_name($parstack,$safeeval);        my $name= &get_resource_name($parstack,$safeeval);
       if ($status eq 'CAN_ANSWER') {        if ($status eq 'CAN_ANSWER') {
Line 338  sub start_problem { Line 348  sub start_problem {
   }    }
  }   }
       } elsif ($status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER'        } elsif ($status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER'
        || $status eq 'CLOSED') {         || $status eq 'CLOSED' || $status eq 'UNAVALAILABLE') {
  $result.=$head_tag_start.   $result.=$head_tag_start.
   "<title>$name</title></head>\n$body_tag_start\n";    "<title>$name</title></head>\n$body_tag_start\n";
       }        }
Line 448  sub end_problem { Line 458  sub end_problem {
   } elsif ($target eq 'edit') {    } elsif ($target eq 'edit') {
     &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();
   }     }
   return $result;    return $result;
 }  }
   

Removed from v.1.141  
changed lines
  Added in v.1.142


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