--- loncom/homework/structuretags.pm 2006/04/15 01:06:59 1.346
+++ loncom/homework/structuretags.pm 2006/04/20 03:28:52 1.350
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.346 2006/04/15 01:06:59 albertel Exp $
+# $Id: structuretags.pm,v 1.350 2006/04/20 03:28:52 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -79,7 +79,6 @@ sub page_start {
}
}
-
if ($target eq 'tex') {
return
&Apache::londefdef::start_html($target,$token,$tagstack,
@@ -162,7 +161,7 @@ sub page_start {
}
$form_tag_start.='>';
}
-
+ &Apache::lonnet::logthis("page_start -- ".length($page_start));
return ($page_start,$form_tag_start);
}
@@ -250,7 +249,7 @@ sub problem_edit_header {
sub problem_edit_footer {
return '
'.
- &Apache::lonhtmlcommon::htmlareaselectactive(@Apache::lonxml::htmlareafields).
+ &Apache::lonhtmlcommon::htmlareaselectactive(&Apache::lonhtmlcommon::get_htmlareafields()).
"\n\n".&Apache::loncommon::end_page();
}
@@ -597,9 +596,13 @@ sub start_problem {
my $accessmsg;
my $name= &get_resource_name($parstack,$safeeval);
- my ($result,$form_tag_start)=
- &page_start($target,$token,$tagstack,$parstack,$parser,$safeeval,
- $name);
+ my ($result,$form_tag_start);
+ if ($target eq 'web' || $target eq 'webgrade' || $target eq 'tex') {
+ ($result,$form_tag_start) =
+ &page_start($target,$token,$tagstack,$parstack,$parser,$safeeval,
+ $name);
+ }
+
if ($target eq 'tex' and $env{'request.symb'} =~ m/\.page_/) {$result='';}
if ($target eq 'analyze') { my $rndseed=&setup_rndseed($safeeval); }
@@ -861,7 +864,7 @@ sub end_problem {
if ($target ne 'tex' &&
$env{'form.answer_output_mode'} ne 'tex') {
$result.="";
- $result.=&Apache::lonhtmlcommon::htmlareaselectactive(@Apache::lonxml::htmlareafields);
+ $result.= &Apache::lonhtmlcommon::htmlareaselectactive(&Apache::lonhtmlcommon::get_htmlareafields());
}
if ($target eq 'web') {
$result.= &Apache::loncommon::end_page({'discussion' => 1});
@@ -872,7 +875,6 @@ sub end_problem {
}
if ($env{'form.print_discussions'} eq 'yes') {
$result.=&Apache::lonxml::xmlend($target,$parser);
- $result=~s/<\/html>//;
} else {
$result .= '\keephidden{ENDOFPROBLEM}\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}';
if (not $env{'request.symb'} =~ m/\.page_/) {
@@ -957,7 +959,7 @@ sub end_library {
$result=&problem_edit_footer();
} elsif ($target eq 'web' && $$tagstack[0] ne 'problem' &&
$env{'request.state'} eq "construct") {
- $result.=''.&Apache::lonxml::xmlend();
+ $result.=''.&Apache::loncommon::end_page({'discussion' => 1});
}
if ($$tagstack[0] eq 'library') { &reset_problem_globals('library') };
return $result;