--- loncom/homework/structuretags.pm 2006/04/14 21:09:54 1.344
+++ loncom/homework/structuretags.pm 2006/04/18 22:36:23 1.347
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.344 2006/04/14 21:09:54 albertel Exp $
+# $Id: structuretags.pm,v 1.347 2006/04/18 22:36:23 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -70,7 +70,8 @@ sub end_tex {
}
sub page_start {
- my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$name)=@_;
+ my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$name,
+ $extra_head)=@_;
my %found;
foreach my $taginside (@$tagstack) {
foreach my $taglookedfor ('html','body','form') {
@@ -86,12 +87,11 @@ sub page_start {
}
my %body_args;
- my $extra_head;
if (defined($found{'html'})) {
$body_args{'skip_phases'}{'head'}=1;
} else {
- $extra_head = &Apache::lonhtmlcommon::spellheader();
+ $extra_head .= &Apache::lonhtmlcommon::spellheader();
my $css_href = &Apache::lonnet::EXT('resource.0.cssfile');
if ($css_href =~ /\S/) {
@@ -250,7 +250,7 @@ sub problem_edit_header {
sub problem_edit_footer {
return '
'.
- &Apache::lonhtmlcommon::htmlareaselectactive(@Apache::lonxml::htmlareafields).
+ &Apache::lonhtmlcommon::htmlareaselectactive(&Apache::lonhtmcommon::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::lonhtmcommon::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/) {
@@ -890,7 +889,7 @@ sub end_problem {
}
if ($target eq 'answer' && ($env{'request.state'} eq 'construct')
&& $env{'form.answer_output_mode'} ne 'tex') {
- $result.=&Apache::lonxml::xmlend().'