Diff for /loncom/interface/portfolio.pm between versions 1.11 and 1.15

version 1.11, 2004/07/03 00:35:01 version 1.15, 2004/07/09 18:43:40
Line 167  sub handler { Line 167  sub handler {
     my $isFile;      my $isFile;
     my $isDir;      my $isDir;
     my $isEmpty;      my $isEmpty;
     # send header  
     # FIXME need to start using  
     &Apache::loncommon::no_cache($r);      &Apache::loncommon::no_cache($r);
     &Apache::loncommon::content_type($r, 'text/html');      &Apache::loncommon::content_type($r,'text/html');
     &Apache::loncommon::bodytag('Portfolio Managment', 'bgcolor="dogfood"');  
     $r->send_http_header;      $r->send_http_header;
       # Give the LON-CAPA page header
       $r->print('<html><head><title>'.
                 &mt('Portfolio Manager').
                 "</title></head>\n".
                 &Apache::loncommon::bodytag('Portfolio Manager'));
       $r->rflush();
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
                                             ['selectfile','currentpath', 'currentfile']);                                              ['selectfile','currentpath', 'currentfile']);
     # currentPath and currentFile need to be set for the rest of things to happen      # currentPath and currentFile need to be set for the rest of things to happen
Line 213  sub handler { Line 216  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 $portfolio_root = &Apache::loncommon::propath($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         '/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;          $isEmpty = 1;
     }else{      } else {
         $isEmpty = 0;          $isEmpty = 0;
     }      }
     # Stuff to maintain proper setting for selected file      # Stuff to maintain proper setting for selected file
Line 247  sub handler { Line 253  sub handler {
     $r->print('</td>><td>');      $r->print('</td>><td>');
     $r->print(displayActions($currentPath, $currentFile, $isDir, $isEmpty));      $r->print(displayActions($currentPath, $currentFile, $isDir, $isEmpty));
     $r->print('</td>></tr></table>');      $r->print('</td>></tr></table>');
     $r->print('</blockquote></body>');      $r->print('</blockquote>');
       $r->print("</body>\n</html>\n");
       $r->rflush();
     return OK;      return OK;
 }  }
   

Removed from v.1.11  
changed lines
  Added in v.1.15


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>