version 1.11, 2004/07/03 00:35:01
|
version 1.12, 2004/07/09 16:36:09
|
Line 213 sub handler {
|
Line 213 sub handler {
|
# we always need $dirList, plus this will return information about the current file |
# we always need $dirList, plus this will return information about the current file |
# as well as information about he home server directory structure, specifically |
# as well as information about he home server directory structure, specifically |
# the path to the users userfiles directory. |
# the path to the users userfiles directory. |
my $list = &Apache::lonnet::portfoliolist($currentPath, $currentFile); |
my $portfolioRoot = '/home/httpd/lonUsers/'.$ENV{'user.domain'}.'/'; |
@dirList = split(/:/,$list); |
$ENV{'user.name'} =~ /^(.?)(.?)(.?)/; |
if (@dirList == 2){ # need to know if directory is empty to it can be removed if desired |
$portfolioRoot = $portfolioRoot.$1.'/'.$2.'/'.$3.'/'.$ENV{'user.name'}.'/userfiles/portfolio'; |
|
my @list = &Apache::lonnet::dirlist($currentPath, $ENV{'user.domain'}, $ENV{'user.name'}, $portfolioRoot); |
|
@dirList = @list; |
|
if (@dirList == 2) { # need to know if directory is empty so it can be removed if desired |
$isEmpty = 1; |
$isEmpty = 1; |
}else{ |
}else{ |
$isEmpty = 0; |
$isEmpty = 0; |