--- loncom/interface/loncommon.pm 2010/03/16 19:55:49 1.953 +++ loncom/interface/loncommon.pm 2010/03/17 19:35:56 1.954 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.953 2010/03/16 19:55:49 droeschl Exp $ +# $Id: loncommon.pm,v 1.954 2010/03/17 19:35:56 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4559,6 +4559,11 @@ sub bodytag { my ($title,$function,$addentries,$bodyonly,$domain,$forcereg, $no_nav_bar,$bgcolor,$no_inline_link,$args)=@_; + my $public; + if ((($env{'user.name'} eq 'public') && ($env{'user.domain'} eq 'public')) + || ($env{'user.name'} eq '') && ($env{'user.domain'} eq '')) { + $public = 1; + } if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); } $function = &get_users_function() if (!$function); @@ -4608,7 +4613,7 @@ sub bodytag { } my $name = &plainname($env{'user.name'},$env{'user.domain'}); - if ($env{'user.name'} eq 'public' && $env{'user.domain'} eq 'public') { + if ($public) { undef($role); } else { $name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'}); @@ -4666,7 +4671,7 @@ sub bodytag { $bodytag .= qq|
$realm $dc_info
|; #don't show menus for public users - if($env{'user.name'} ne 'public' && $env{'user.domain'} ne 'public'){ + if (!$public){ $bodytag .= Apache::lonmenu::secondary_menu(); $bodytag .= Apache::lonmenu::serverform(); $bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');