--- loncom/interface/portfolio.pm 2006/07/19 14:57:18 1.137
+++ loncom/interface/portfolio.pm 2006/08/04 20:41:32 1.144
@@ -1,7 +1,7 @@
# The LearningOnline Network
# portfolio browser
#
-# $Id: portfolio.pm,v 1.137 2006/07/19 14:57:18 albertel Exp $
+# $Id: portfolio.pm,v 1.144 2006/08/04 20:41:32 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -43,7 +43,7 @@ use LONCAPA;
sub group_args {
my $output;
if (defined($env{'form.group'})) {
- $ouput .= '&group='.$env{'form.group'};
+ $output .= '&group='.$env{'form.group'};
if (defined($env{'form.ref'})) {
$output .= '&ref='.$env{'form.ref'};
}
@@ -54,12 +54,13 @@ sub group_args {
sub group_form_data {
my $output;
if (defined($env{'form.group'})) {
- $ouput = '';
+ $output = '';
if (exists($env{'form.ref'})) {
$output .= '';
}
}
+ return $output;
}
# receives a file name and path stub from username/userfiles/portfolio/
@@ -69,15 +70,16 @@ sub make_anchor {
$continue_select) = @_;
if ($continue_select ne 'true') {$continue_select = 'false'};
my $anchor = ''.$filename.'';
return $anchor;
}
+
my $dirptr=16384;
sub display_common {
my ($r,$url,$current_path,$is_empty,$dir_list,$can_upload)=@_;
- my $namespace = &get_namespace($group);
- my $port_path = &get_port_path($group);
+ my $namespace = &get_namespace();
+ my $port_path = &get_port_path();
if ($can_upload) {
my $groupitem = &group_form_data();
@@ -147,7 +149,7 @@ TABLE
sub display_directory_line {
my ($r,$select_mode,$fullpath, $filename, $mtime, $size, $css_class,
$line, $access_controls, $curr_access, $now, $version_flag,
- $href_location, $url, $current_path, $access_admin_text)=@_;
+ $href_location, $url, $current_path, $access_admin_text, $versions)=@_;
# my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16);
$r->print('
');
$r->print($line);
@@ -167,14 +169,14 @@ sub display_directory_line {
}
sub display_directory {
- my ($r,$url,$current_path,$is_empty,$dir_list,$can_upload,
+ my ($r,$url,$current_path,$is_empty,$dir_list,$group,$can_upload,
$can_modify,$can_delete,$can_setacl)=@_;
my $iconpath= $r->dir_config('lonIconsURL') . "/";
my $display_out;
my $select_mode;
my $checked_files;
- my $port_path = &get_port_path($group);
- my ($uname,$udom) = &get_name_dom($group);
+ my $port_path = &get_port_path();
+ my ($uname,$udom) = &get_name_dom();
my $access_admin_text = &mt('View Status');
if ($can_setacl) {
$access_admin_text = &mt('View/Change Status');
@@ -219,7 +221,7 @@ sub display_directory {
my @dir_lines;
my @version_lines;
my %versioned;
- foreach my $line (sort
+ foreach my $dir_line (sort
{
my ($afile)=split('&',$a,2);
my ($bfile)=split('&',$b,2);
@@ -227,7 +229,7 @@ sub display_directory {
} (@$dir_list)) {
#$strip holds directory/file name
#$dom
- my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16);
+ my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$dir_line,16);
$filename =~ s/\s+$//;
my ($fname,$version,$extension) = &Apache::grades::file_name_version_ext($filename);
if ($version) {
@@ -237,8 +239,8 @@ sub display_directory {
push(@dir_lines, [$filename,$dom,$testdir,$size,$mtime,$obs]);
}
}
- foreach my $line (@dir_lines) {
- my ($filename,$dom,$testdir,$size,$mtime,$obs) = @$line;
+ foreach my $dir_line (@dir_lines) {
+ my ($filename,$dom,$testdir,$size,$mtime,$obs) = @$dir_line;
my ($fname,$version,$extension) = &Apache::grades::file_name_version_ext($filename);
if (($filename ne '.') && ($filename ne '..') && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(\d+)\.([^\.]*)$/)) {
my %version_flag;
@@ -268,7 +270,7 @@ sub display_directory {
my $css_class = 'LC_browser_file';
my $line;
my $fullpath = $current_path.$filename;
- $fullpath = &prepend_group($fullpath,$group);
+ $fullpath = &prepend_group($fullpath);
if ($select_mode eq 'true') {
$line='