--- loncom/interface/loncommon.pm 2006/09/22 19:59:30 1.459 +++ loncom/interface/loncommon.pm 2006/09/27 22:42:05 1.460 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.459 2006/09/22 19:59:30 albertel Exp $ +# $Id: loncommon.pm,v 1.460 2006/09/27 22:42:05 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2854,6 +2854,9 @@ Inputs: =item * $no_inline_link, if true and in remote mode, don't show the 'Switch To Inline Menu' link +=item * $args, optional argument valid values are + no_auto_mt_title -> prevents &mt()ing the title arg + =back Returns: A uniform header for LON-CAPA web pages. @@ -2865,9 +2868,9 @@ other decorations will be returned. sub bodytag { my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle, - $notopbar,$bgcolor,$notitle,$no_inline_link)=@_; + $notopbar,$bgcolor,$notitle,$no_inline_link,$args)=@_; - $title=&mt($title); + if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); } $function = &get_users_function() if (!$function); my $img = &designparm($function.'.img',$domain); @@ -3723,7 +3726,8 @@ Inputs: $title - optional title for the domain function -> force usage of a specific rolish color scheme bgcolor -> override the default page bgcolor - + no_auto_mt_title + -> prevent &mt()ing the title arg =back =cut @@ -3770,8 +3774,8 @@ ADDMETA if (!defined($title)) { $title = 'The LearningOnline Network with CAPA'; } - - $result .= ' LON-CAPA '.&mt($title).'' + if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); } + $result .= ' LON-CAPA '.$title.'' .'' .$head_extra; return $result; @@ -3915,6 +3919,8 @@ Inputs: $title - optional title for the no_inline_link -> if true and in remote mode, don't show the 'Switch To Inline Menu' link + no_auto_mt_title -> prevent &mt()ing the title arg + =back =cut @@ -3924,7 +3930,8 @@ sub start_page { #&Apache::lonnet::logthis("start_page ".join(':',caller(0))); my %head_args; foreach my $arg ('redirect','force_register','domain','function', - 'bgcolor','frameset','no_nav_bar','only_body') { + 'bgcolor','frameset','no_nav_bar','only_body', + 'no_auto_mt_title') { if (defined($args->{$arg})) { $head_args{$arg} = $args->{$arg}; } @@ -3950,7 +3957,8 @@ sub start_page { $args->{'only_body'}, $args->{'domain'}, $args->{'force_register'}, $args->{'body_title'}, $args->{'no_nav_bar'}, $args->{'bgcolor'}, - $args->{'no_title'}, $args->{'no_inline_link'}); + $args->{'no_title'}, $args->{'no_inline_link'}, + $args); } }