--- loncom/xml/lonxml.pm 2006/03/08 22:15:47 1.399
+++ loncom/xml/lonxml.pm 2006/04/18 20:50:45 1.408
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.399 2006/03/08 22:15:47 albertel Exp $
+# $Id: lonxml.pm,v 1.408 2006/04/18 20:50:45 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -204,9 +204,9 @@ sub xmlend {
$discussion.='\keephidden{ENDOFPROBLEM}\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}\end{document}';
&Apache::lonxml::newparser($parser,\$discussion,'');
return '';
- } else {
- return $discussion.&Apache::loncommon::endbodytag();
}
+
+ return $discussion;
}
sub tokeninputfield {
@@ -304,18 +304,6 @@ sub printtokenheader {
}
}
-sub fontsettings {
- my $headerstring='';
- if (($env{'browser.os'} eq 'mac') && (!$env{'browser.mathml'})) {
- $headerstring.=
- '';
- } elsif (!$env{'browser.mathml'} && $env{'browser.unicode'}) {
- $headerstring.=
- '';
- }
- return $headerstring;
-}
-
sub printalltags {
my $temp;
foreach $temp (sort keys %Apache::lonxml::alltags) {
@@ -1038,13 +1026,13 @@ sub init_counter {
sub store_counter {
&Apache::lonnet::appenv(('form.counter' => $Apache::lonxml::counter));
+ $Apache::lonxml::counter_changed=0;
return '';
}
{
my $state;
sub clear_problem_counter {
- &Apache::lonnet::logthis(" cpc called from ".(join(':',caller(0))));
undef($state);
&Apache::lonnet::delenv('form.counter');
&Apache::lonxml::init_counter();
@@ -1061,6 +1049,11 @@ sub store_counter {
&Apache::lonnet::appenv(('form.counter' => $state));
}
}
+ sub get_problem_counter {
+ if ($Apache::lonxml::counter_changed) { &store_counter() }
+ &Apache::lonnet::transfer_profile_to_env();
+ return $env{'form.counter'};
+ }
}
sub get_all_text {
@@ -1453,17 +1446,13 @@ sub handler {
my $result = '';
my $filecontents=&Apache::lonnet::getfile($file);
if ($filecontents eq -1) {
- my $bodytag=&Apache::loncommon::bodytag('File Error');
+ my $start_page=&Apache::loncommon::start_page('File Error');
+ my $end_page=&Apache::loncommon::end_page('File Error');
my $fnf=&mt('File not found');
$result=(<
-
-$fnf
-
-$bodytag
+$start_page
$fnf: $file
-