--- loncom/interface/portfolio.pm 2006/06/22 17:56:06 1.114 +++ loncom/interface/portfolio.pm 2006/07/08 01:20:40 1.132 @@ -1,3 +1,8 @@ +# The LearningOnline Network +# portfolio browser +# +# $Id: portfolio.pm,v 1.132 2006/07/08 01:20:40 raeburn Exp $ +# # Copyright Michigan State University Board of Trustees # # This file is part of the LearningOnline Network with CAPA (LON-CAPA). @@ -31,6 +36,7 @@ use Apache::lonfeedback; use Apache::lonlocal; use Apache::lonnet; use Apache::longroup; +use Apache::lonhtmlcommon; use HTML::Entities; use LONCAPA; @@ -49,29 +55,32 @@ sub make_anchor { } my $dirptr=16384; sub display_common { - my ($r,$url,$current_path,$is_empty,$dir_list,$group)=@_; - my $groupitem; + my ($r,$url,$current_path,$is_empty,$dir_list,$group,$can_upload)=@_; my $namespace = &get_namespace($group); my $port_path = &get_port_path($group); - if (defined($group)) { - $groupitem = ''; - } - my $iconpath= $r->dir_config('lonIconsURL') . "/"; - my %text=&Apache::lonlocal::texthash('upload' => 'Upload', + if ($can_upload) { + my $groupitem; + if (defined($group)) { + $groupitem = ''; + } + my $iconpath= $r->dir_config('lonIconsURL') . "/"; + my %text=&Apache::lonlocal::texthash( + 'upload' => 'Upload', 'upload_label' => 'Upload file to current directory:', 'createdir' => 'Create Subdirectory', 'createdir_label' => 'Create subdirectory in current directory:'); - my $escuri = &HTML::Entities::encode($r->uri,'&<>"'); - $r->print(<<"TABLE"); + my $escuri = &HTML::Entities::encode($r->uri,'&<>"'); + $r->print(<<"TABLE");
$text{'upload_label'} | -$groupitem + |