--- loncom/interface/portfolio.pm 2006/06/22 17:56:06 1.114
+++ loncom/interface/portfolio.pm 2006/07/03 04:25:08 1.121.2.5
@@ -1,3 +1,8 @@
+# The LearningOnline Network
+# portfolio browser
+#
+# $Id: portfolio.pm,v 1.121.2.5 2006/07/03 04:25:08 albertel Exp $
+#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -49,29 +54,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");