--- loncom/interface/portfolio.pm 2004/07/03 00:35:01 1.11 +++ loncom/interface/portfolio.pm 2004/07/09 18:43:40 1.15 @@ -167,12 +167,15 @@ sub handler { my $isFile; my $isDir; my $isEmpty; - # send header - # FIXME need to start using &Apache::loncommon::no_cache($r); - &Apache::loncommon::content_type($r, 'text/html'); - &Apache::loncommon::bodytag('Portfolio Managment', 'bgcolor="dogfood"'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; + # Give the LON-CAPA page header + $r->print(''. + &mt('Portfolio Manager'). + "\n". + &Apache::loncommon::bodytag('Portfolio Manager')); + $r->rflush(); &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['selectfile','currentpath', 'currentfile']); # currentPath and currentFile need to be set for the rest of things to happen @@ -213,11 +216,14 @@ sub handler { # 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 $list = &Apache::lonnet::portfoliolist($currentPath, $currentFile); - @dirList = split(/:/,$list); - if (@dirList == 2){ # need to know if directory is empty to it can be removed if desired + 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; - }else{ + } else { $isEmpty = 0; } # Stuff to maintain proper setting for selected file @@ -247,7 +253,9 @@ sub handler { $r->print('>'); $r->print(displayActions($currentPath, $currentFile, $isDir, $isEmpty)); $r->print('>'); - $r->print(''); + $r->print(''); + $r->print("\n\n"); + $r->rflush(); return OK; }