--- loncom/lond 2004/06/08 22:09:44 1.193 +++ loncom/lond 2004/06/18 23:57:17 1.199 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.193 2004/06/08 22:09:44 raeburn Exp $ +# $Id: lond,v 1.199 2004/06/18 23:57:17 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -54,7 +54,7 @@ my $DEBUG = 0; # Non zero to ena my $status=''; my $lastlog=''; -my $VERSION='$Revision: 1.193 $'; #' stupid emacs +my $VERSION='$Revision: 1.199 $'; #' stupid emacs my $remoteVERSION; my $currenthostid; my $currentdomainid; @@ -2778,6 +2778,25 @@ sub make_new_child { Reply($client, "refused\n", $userinput); } +# ----------------------------------------------------------portfolio directory list (portls) + } elsif ($userinput =~ /^portls/) { + if(isClient) { + my ($cmd,$uname,$udom)=split(/:/,$userinput); + my $udir=propath($udom,$uname).'/userfiles/portfolio'; + my $dirLine=''; + my $dirContents=''; + if (opendir(LSDIR,$udir.'/')){ + while ($dirLine = readdir(LSDIR)){ + $dirContents = $dirContents.$dirLine.'
'; + } + }else{ + $dirContents = "No directory found\n"; + } + print $client $dirContents."\n"; + } else { + Reply($client, "refused\n", $userinput); + } + # -------------------------------------------------------------------------- ls } elsif ($userinput =~ /^ls/) { if(isClient) {