--- loncom/homework/structuretags.pm 2006/04/14 21:09:54 1.344 +++ loncom/homework/structuretags.pm 2007/06/22 20:42:20 1.382 @@ -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.382 2007/06/22 20:42:20 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,6 +38,9 @@ use Apache::lonlocal; use Apache::lonxml; use Apache::lonenc(); use Time::HiRes qw( gettimeofday tv_interval ); +use lib '/home/httpd/lib/perl/'; +use LONCAPA; + BEGIN { &Apache::lonxml::register('Apache::structuretags',('block','languageblock','instructorcomment','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','problemtype','startouttext','endouttext','simpleeditbutton','definetag')); } @@ -70,7 +73,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') { @@ -78,27 +82,29 @@ sub page_start { } } - if ($target eq 'tex') { return &Apache::londefdef::start_html($target,$token,$tagstack, $parstack,$parser,$safeeval); } + $extra_head.= ' + +'; + 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(); + + $extra_head .= &Apache::londefdef::generate_css_links(); - my $css_href = &Apache::lonnet::EXT('resource.0.cssfile'); - if ($css_href =~ /\S/) { - &Apache::lonxml::extlink($css_href); - $extra_head .= - ''; - } if ($target eq 'edit') { $extra_head.=&Apache::edit::js_change_detection(). "