--- loncom/interface/loncommon.pm 2010/05/18 00:35:17 1.948.2.1 +++ loncom/interface/loncommon.pm 2010/05/18 00:44:12 1.948.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.948.2.1 2010/05/18 00:35:17 raeburn Exp $ +# $Id: loncommon.pm,v 1.948.2.2 2010/05/18 00:44:12 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4572,6 +4572,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); @@ -4621,12 +4626,12 @@ 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'}); } - + my $titleinfo = '

'.$title.'

'; # # Extra info if you are the DC @@ -4680,7 +4685,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'); @@ -10277,6 +10282,10 @@ sub construct_course { $cenv{'url'}=$oldcenv{'url'}; # Restore title $cenv{'description'}=$oldcenv{'description'}; +# Restore creation date, creator and creation context. + $cenv{'internal.created'}=$oldcenv{'internal.created'}; + $cenv{'internal.creator'}=$oldcenv{'internal.creator'}; + $cenv{'internal.creationcontext'}=$oldcenv{'internal.creationcontext'}; # Mark as cloned $cenv{'clonedfrom'}=$cloneid; # Need to clone grading mode