--- loncom/homework/structuretags.pm 2006/04/14 21:42:05 1.345 +++ loncom/homework/structuretags.pm 2006/04/20 02:05:30 1.349 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.345 2006/04/14 21:42:05 albertel Exp $ +# $Id: structuretags.pm,v 1.349 2006/04/20 02:05:30 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -250,7 +250,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(); } @@ -596,7 +596,6 @@ sub start_problem { my $status; my $accessmsg; - #should get back a or the neccesary stuff to start XML/MathML my $name= &get_resource_name($parstack,$safeeval); my ($result,$form_tag_start)= &page_start($target,$token,$tagstack,$parstack,$parser,$safeeval, @@ -862,10 +861,10 @@ 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::lonxml::xmlend().''; + $result.= &Apache::loncommon::end_page({'discussion' => 1}); } elsif ($target eq 'tex') { my $endminipage = ''; if (not $env{'form.problem_split'}=~/yes/) { @@ -873,7 +872,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_/) { @@ -890,7 +888,7 @@ sub end_problem { } if ($target eq 'answer' && ($env{'request.state'} eq 'construct') && $env{'form.answer_output_mode'} ne 'tex') { - $result.=&Apache::lonxml::xmlend().''; + $result.=&Apache::loncommon::end_page({'discussion' => 1}); # normally we get it from above, but in CSTR # we always show answer mode too. } @@ -958,7 +956,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;