--- loncom/homework/structuretags.pm 2005/04/22 17:15:33 1.289 +++ loncom/homework/structuretags.pm 2005/04/29 21:22:33 1.291 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.289 2005/04/22 17:15:33 albertel Exp $ +# $Id: structuretags.pm,v 1.291 2005/04/29 21:22:33 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -68,6 +68,35 @@ sub end_tex { return ''; } +sub body_tag_start { + my ($target,$background,$bgcolor)=@_; + my $body_tag_start=''."\n"; + } + return $body_tag_start; +} + sub page_start { my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; my %found; @@ -93,35 +122,13 @@ sub page_start { $body_tag_start=&Apache::loncommon::bodytag(); $body_tag_start.=&Apache::lonxml::message_location(); } elsif (!defined($found{'body'})) { - $body_tag_start=''."\n"; - } - if ($target eq 'web' && $env{'request.state'} ne 'construct') { + my $bgcolor=&Apache::lonxml::get_param('bgcolor',$parstack, + $safeeval); + $body_tag_start=&body_tag_start($background,$bgcolor); + if ( ($target eq 'web' || $target eq 'webgrade') + && $env{'request.state'} ne 'construct') { my ($symb,undef,undef,undef,$publicuser)= &Apache::lonxml::whichuser(); if ($symb eq '' && !$publicuser) {