[LON-CAPA-cvs] cvs: loncom(version_2_2_X) /interface portfolio.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 18 Aug 2006 20:55:47 -0000


albertel		Fri Aug 18 16:55:47 2006 EDT

  Modified files:              (Branch: version_2_2_X)
    /loncom/interface	portfolio.pm 
  Log:
  - backport 1.160
  
  
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.156.2.1 loncom/interface/portfolio.pm:1.156.2.2
--- loncom/interface/portfolio.pm:1.156.2.1	Mon Aug 14 17:35:04 2006
+++ loncom/interface/portfolio.pm	Fri Aug 18 16:55:44 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # portfolio browser
 #
-# $Id: portfolio.pm,v 1.156.2.1 2006/08/14 21:35:04 albertel Exp $
+# $Id: portfolio.pm,v 1.156.2.2 2006/08/18 20:55:44 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -644,7 +644,7 @@
 #    $info .= &mt('Alternatively access can be granted to people with specific LON-CAPA usernames and domains.');
     $info .= '</li></ul>';
     if ($group eq '') {
-        $info .= (&mt("Direct others to the 'Display file listing' link (shown when there are viewable files) on your personal information page:<br /><a href='/adm/$udom/$uname/aboutme'>http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme</a>"));
+        $info .= (&mt("A listing of files viewable without log-in is available at: <a href='/adm/$udom/$uname/aboutme/portfolio'>http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme/portfolio</a>.<br />For logged in users a 'Display file listing' link will also appear (when there are viewable files) on your personal information page:<br /><a href='/adm/$udom/$uname/aboutme'>http://$ENV{'SERVER_NAME'}/adm/$udom/$uname/aboutme</a><br />"));
     }
     
     if ($can_setacl) {
@@ -1678,7 +1678,10 @@
 }
 
 sub get_portfolio_root {
-    my ($uname,$udom) = &get_name_dom();
+    my ($udom,$uname) = @_;
+    if (!(defined($udom)) || !(defined($uname))) {
+        ($uname,$udom) = &get_name_dom();
+    }
     my $path;
     if (defined($env{'form.group'})) {
         $path = '/userfiles/groups/'.$env{'form.group'}.'/portfolio';