[LON-CAPA-cvs] cvs: loncom /interface portfolio.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 09 Jul 2004 18:43:40 -0000
albertel Fri Jul 9 14:43:40 2004 EDT
Modified files:
/loncom/interface portfolio.pm
Log:
- correcting to use propath
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.14 loncom/interface/portfolio.pm:1.15
--- loncom/interface/portfolio.pm:1.14 Fri Jul 9 13:12:38 2004
+++ loncom/interface/portfolio.pm Fri Jul 9 14:43:40 2004
@@ -216,10 +216,10 @@
# we always need $dirList, plus this will return information about the current file
# as well as information about he home server directory structure, specifically
# the path to the users userfiles directory.
- my $portfolioRoot = '/home/httpd/lonUsers/'.$ENV{'user.domain'}.'/';
- $ENV{'user.name'} =~ /^(.?)(.?)(.?)/;
- $portfolioRoot = $portfolioRoot.$1.'/'.$2.'/'.$3.'/'.$ENV{'user.name'}.'/userfiles/portfolio';
- my @list = &Apache::lonnet::dirlist($currentPath, $ENV{'user.domain'}, $ENV{'user.name'}, $portfolioRoot);
+ my $portfolio_root = &Apache::loncommon::propath($ENV{'user.domain'},
+ $ENV{'user.name'}).
+ '/userfiles/portfolio';
+ my @list = &Apache::lonnet::dirlist($currentPath, $ENV{'user.domain'}, $ENV{'user.name'}, $portfolio_root);
@dirList = @list;
if (@dirList == 2) { # need to know if directory is empty so it can be removed if desired
$isEmpty = 1;