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

version 1.97, 2002/06/21 20:27:54 version 1.98, 2002/06/25 14:50:53
Line 203  sub start_problem { Line 203  sub start_problem {
     &page_start($target,$token,$tagstack,$parstack,$parser,$safeeval);      &page_start($target,$token,$tagstack,$parstack,$parser,$safeeval);
   if ($target eq 'tex' and $ENV{'request.symb'} =~ m/\.page_/) { $result = '';}    if ($target eq 'tex' and $ENV{'request.symb'} =~ m/\.page_/) { $result = '';}
   
   if ($target eq 'web' || $target eq 'grade' || $target eq 'answer') {    if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') {
     #handle exam checkout      #handle exam checkout
     if ($Apache::lonhomework::type eq 'exam') {      if ($Apache::lonhomework::type eq 'exam') {
       my $token=$Apache::lonhomework::history{"resource.0.outtoken"};        my $token=$Apache::lonhomework::history{"resource.0.outtoken"};
Line 283  sub start_problem { Line 283  sub start_problem {
  $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";
       }        }
     }    } elsif ($target eq 'tex') {
         my $id = $Apache::inputtags::part;
         my $duedate = &Apache::lonnet::EXT("resource.$id.duedate"); 
         $duedate = POSIX::strftime("%c",localtime($duedate));
         if (not $ENV{'request.symb'} =~ m/\.page_/) {
     $result .= '\begin{document} \noindent\fbox{Due date: '.$duedate.'} \\vskip 1 mm';  
         } else {
     $result .= '\begin{minipage}{\minipagewidth} ';
         }
     }
   } elsif ($target eq 'edit') {    } elsif ($target eq 'edit') {
     $result.=$head_tag_start."</head>".$body_tag_start.      $result.=$head_tag_start."</head>".$body_tag_start.
       '<form name="lonhomework" method="POST" action="'.        '<form name="lonhomework" method="POST" action="'.
Line 301  sub start_problem { Line 310  sub start_problem {
   } elsif ($target eq 'modified') {    } elsif ($target eq 'modified') {
     $result=$token->[4];      $result=$token->[4];
     $result.=&Apache::edit::handle_insert();      $result.=&Apache::edit::handle_insert();
   } elsif ($target eq 'tex') {  
       if (not $ENV{'request.symb'} =~ m/\.page_/) {  
   $result .= '\begin{document} ';  
       } else {  
   $result .= '\begin{minipage}{\minipagewidth} ';  
       }  
   } else {    } else {
     # page_start returned a starting result, delete it if we don't need it      # page_start returned a starting result, delete it if we don't need it
     $result = '';      $result = '';

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


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