[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /interface loncommon.pm
raeburn
raeburn@source.lon-capa.org
Tue, 18 May 2010 00:44:12 -0000
raeburn Tue May 18 00:44:12 2010 EDT
Modified files: (Branch: version_2_10_X)
/loncom/interface loncommon.pm
Log:
- Backport 1.954, 1.955.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.948.2.1 loncom/interface/loncommon.pm:1.948.2.2
--- loncom/interface/loncommon.pm:1.948.2.1 Tue May 18 00:35:17 2010
+++ loncom/interface/loncommon.pm Tue May 18 00:44:12 2010
@@ -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 @@
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 @@
}
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 = '<h1>'.$title.'</h1>';
#
# Extra info if you are the DC
@@ -4680,7 +4685,7 @@
$bodytag .= qq|<div id="LC_realm">$realm $dc_info</div>|;
#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 @@
$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