[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

banghart lon-capa-cvs@mail.lon-capa.org
Fri, 18 Jun 2004 20:35:18 -0000


banghart		Fri Jun 18 16:35:18 2004 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  
  	Added sub portfoliolist, returns contents of username/userfiles/portfolio
  
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.511 loncom/lonnet/perl/lonnet.pm:1.512
--- loncom/lonnet/perl/lonnet.pm:1.511	Thu Jun 17 14:31:25 2004
+++ loncom/lonnet/perl/lonnet.pm	Fri Jun 18 16:35:18 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.511 2004/06/17 18:31:25 raeburn Exp $
+# $Id: lonnet.pm,v 1.512 2004/06/18 20:35:18 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3575,6 +3575,20 @@
            $deleteflag);
 }
 
+
+# ------------------------------------------------------------ Portfolio Director Lister
+sub portfoliolist {
+	# returns listing of contents of user's /userfiles/portfolio/ directory
+	# 
+	my ($udom, $uname, $uhome);
+	$uname=$ENV{'user.name'};
+        $udom=$ENV{'user.domain'};
+        $uhome=$ENV{'user.home'};
+	my $listing = reply('portls:'.$uname.':'.$udom, $uhome);
+	return '<strong>'.$listing.'</strong><br />';
+}
+
+
 # ------------------------------------------------------------ Directory lister
 
 sub dirlist {