[LON-CAPA-cvs] cvs: loncom /interface lonsyllabus.pm

bisitz bisitz@source.lon-capa.org
Wed, 14 Apr 2010 14:15:16 -0000


bisitz		Wed Apr 14 14:15:16 2010 EDT

  Modified files:              
    /loncom/interface	lonsyllabus.pm 
  Log:
  Bug 5526: Don't offer personal information page link (aboutme) to public users
  
  
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.108 loncom/interface/lonsyllabus.pm:1.109
--- loncom/interface/lonsyllabus.pm:1.108	Wed Mar 10 14:20:53 2010
+++ loncom/interface/lonsyllabus.pm	Wed Apr 14 14:15:15 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Syllabus
 #
-# $Id: lonsyllabus.pm,v 1.108 2010/03/10 14:20:53 wenzelju Exp $
+# $Id: lonsyllabus.pm,v 1.109 2010/04/14 14:15:15 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -282,10 +282,20 @@
 #----------Print last update
     my $lastmod=$syllabus{'uploaded.lastmodified'};
     $lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never'));
-    my $who = &Apache::loncommon::aboutmewrapper(
-        &Apache::loncommon::plainname($syllabus{'uploaded.name'},
-        $syllabus{'uploaded.domain'}),$syllabus{'uploaded.name'},
-        $syllabus{'uploaded.domain'});
+    my $who;
+    if (($env{'user.name'} ne 'public') && ($env{'user.domain'} ne 'public')) {
+        $who = &Apache::loncommon::aboutmewrapper(
+                   &Apache::loncommon::plainname($syllabus{'uploaded.name'},
+                   $syllabus{'uploaded.domain'}),$syllabus{'uploaded.name'},
+                   $syllabus{'uploaded.domain'});
+    } else {
+        # Public user?
+        # Only display name of user, but no link to personal information page
+        $who = &Apache::loncommon::plainname(
+                   $syllabus{'uploaded.name'},
+                   $syllabus{'uploaded.domain'});
+    }
+
     if ($target ne 'tex') {
         $r->print('<div class="LC_info">'.&mt('Last updated').': '.
             $lastmod . ' '.