version 1.101, 2002/07/03 15:36:40
|
version 1.103, 2002/08/07 17:24:35
|
Line 57 sub start_tex {
|
Line 57 sub start_tex {
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my $bodytext=&Apache::lonxml::get_all_text("/tex",$$parser[$#$parser]); |
my $bodytext=&Apache::lonxml::get_all_text("/tex",$$parser[$#$parser]); |
if ($target eq 'tex') { |
if ($target eq 'tex') { |
return $bodytext |
return $bodytext.' '; |
} |
} |
return ''; |
return ''; |
} |
} |
Line 285 sub start_problem {
|
Line 285 sub start_problem {
|
"<title>$name</title></head>\n$body_tag_start\n"; |
"<title>$name</title></head>\n$body_tag_start\n"; |
} |
} |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
|
my $name= &Apache::lonxml::get_param('name',$parstack,$safeeval); |
|
if ($name eq '') { |
|
$name=&Apache::lonnet::EXT('resource.title'); |
|
if ($name eq 'con_lost') { $name = ''; } |
|
} |
|
$Apache::lonhomework::name=$name; |
my $id = $Apache::inputtags::part; |
my $id = $Apache::inputtags::part; |
my $duedate = &Apache::lonnet::EXT("resource.$id.duedate"); |
my $duedate = &Apache::lonnet::EXT("resource.$id.duedate"); |
$duedate = POSIX::strftime("%c",localtime($duedate)); |
$duedate = POSIX::strftime("%c",localtime($duedate)); |
Line 300 sub start_problem {
|
Line 306 sub start_problem {
|
chomp $due_file_content; |
chomp $due_file_content; |
if ($due_file_content ne $duedate) { |
if ($due_file_content ne $duedate) { |
$temp_file = Apache::File->new('>'.$filename); |
$temp_file = Apache::File->new('>'.$filename); |
print $temp_file "$duedate\n"; |
print $temp_file "$duedate\n"; |
|
if($duedate eq 'Wed 31 Dec 1969 07:00:00 PM EDT') {$duedate = '';} |
if (not $ENV{'request.symb'} =~ m/\.page_/) { |
if (not $ENV{'request.symb'} =~ m/\.page_/) { |
$result .= '\begin{document} \noindent\textit{Due date: '.$duedate.'} \vskip 1 mm'; |
$result .= '\begin{document} \noindent\textit{Due date: '.$duedate.'} \vskip 1 mm'; |
} else { |
} else { |