--- loncom/homework/structuretags.pm 2006/03/29 22:41:32 1.339 +++ loncom/homework/structuretags.pm 2006/04/13 18:35:06 1.342 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.339 2006/03/29 22:41:32 albertel Exp $ +# $Id: structuretags.pm,v 1.342 2006/04/13 18:35:06 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -89,10 +89,8 @@ sub body_tag_start { } $body_tag_start.='>'.&Apache::lonmenu::menubuttons(undef,$target,1); - &Apache::lontexconvert::jsMath_reset(); - if ($env{'environment.texengine'} eq 'jsMath') { - $body_tag_start.=&Apache::lontexconvert::jsMath_header(); - } + $body_tag_start.=&Apache::lontexconvert::init_math_support(); + return $body_tag_start; } @@ -253,7 +251,7 @@ sub problem_edit_footer { return '
'. &Apache::lonhtmlcommon::htmlareaselectactive(@Apache::lonxml::htmlareafields). - "\n\n".&Apache::loncommon::endbodytag()."\n"; + "\n\n".&Apache::loncommon::end_page(); } sub option { @@ -942,8 +940,9 @@ sub start_library { } elsif ($target eq 'modified') { $result=$token->[4]; $result.=&Apache::edit::handle_insert(); - } elsif ($target eq 'web' && $$tagstack[0] ne 'problem' && - $env{'request.state'} eq "construct" ) { + } elsif (($target eq 'web' || $target eq 'webgrade') + && $$tagstack[0] eq 'library' + && $env{'request.state'} eq "construct" ) { ($result,$head_tag_start,$body_tag_start,$form_tag_start)= &page_start($target,$token,$tagstack,$parstack,$parser,$safeeval); my $name=&get_resource_name($parstack,$safeeval); @@ -963,8 +962,7 @@ sub end_library { $result=&problem_edit_footer(); } elsif ($target eq 'web' && $$tagstack[0] ne 'problem' && $env{'request.state'} eq "construct") { - $result.=''.&Apache::loncommon::endbodytag(). - &Apache::lonxml::xmlend(); + $result.=''.&Apache::lonxml::xmlend(); } if ($$tagstack[0] eq 'library') { &reset_problem_globals('library') }; return $result;