--- loncom/interface/loncommon.pm 2006/03/16 20:08:42 1.307 +++ loncom/interface/loncommon.pm 2006/03/19 22:48:53 1.314 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.307 2006/03/16 20:08:42 albertel Exp $ +# $Id: loncommon.pm,v 1.314 2006/03/19 22:48:53 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2737,6 +2737,10 @@ Inputs: =item * $forcereg, if page should register as content page (relevant for text interface only) +=item * $customtitle, overrides the $title in some way ???? + +=item * $notopbar, if true, keep the 'what is this' info but remove the + navigational links =back Returns: A uniform header for LON-CAPA web pages. @@ -2747,7 +2751,8 @@ other decorations will be returned. =cut sub bodytag { - my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle,$notopbar)=@_; + my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle, + $notopbar)=@_; $title=&mt($title); $function = &get_users_function() if (!$function); my $img=&designparm($function.'.img',$domain); @@ -2967,10 +2972,20 @@ Inputs: $title - optional title for the =cut sub headtag { - my ($title,$head_extra) = @_; + my ($title,$head_extra,$args) = @_; - my $result = ''; + my $result = + ''. + &Apache::lonxml::fontsettings(). + &Apache::lonhtmlcommon::htmlareaheaders(); + if (ref($args->{'redirect'})) { + my ($time,$url) = @{$args->{'redirect'}}; + $result.=< + +ADDMETA + } if (!defined($title)) { $title = 'The LearningOnline Network with CAPA'; } @@ -3027,17 +3042,32 @@ Returns a complete .. sect Inputs: $title - optional title for the page $head_extra - optional extra HTML to incude inside the + %args - additional optional args supported are: + only_body -> is true will set &bodytag() onlybodytag arg on + no_nav_bar -> is true will set &bodytag() notopbar arg on + add_entries -> additional attributes to add to the + domain -> force to color decorate a page for a + specific domain + function -> force usage of a specific rolish color scheme + redirect -> ... =back =cut sub start_page { - my ($title,$head_extra) = @_; + my ($title,$head_extra,$args) = @_; + my %head_args; + if (defined($args->{'redirect'})) { + $head_args{'redirect'} = $args->{'redirect'}; + } + return &Apache::lonxml::xmlbegin(). - &headtag($title,$head_extra).&endheadtag(). - &bodytag($title); + &headtag($title,$head_extra,\%head_args).&endheadtag(). + &bodytag($title, $args->{'function'}, $args->{'add_entries'}, + $args->{'only_body'}, + undef,undef,undef,$args->{'no_nav_bar'}); } =pod