--- loncom/interface/portfolio.pm 2015/01/05 15:56:24 1.232.2.1
+++ loncom/interface/portfolio.pm 2011/10/17 12:41:30 1.233
@@ -1,7 +1,7 @@
# The LearningOnline Network
# portfolio browser
#
-# $Id: portfolio.pm,v 1.232.2.1 2015/01/05 15:56:24 raeburn Exp $
+# $Id: portfolio.pm,v 1.233 2011/10/17 12:41:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -379,22 +379,24 @@ sub display_directory {
my $href_edit_location="/editupload/$udom/$uname/$port_path".$current_path;
my @dir_lines;
my %versioned;
- foreach my $dir_line (sort
- {
- my ($afile)=split('&',$a,2);
- my ($bfile)=split('&',$b,2);
- return (lc($afile) cmp lc($bfile));
- } (@$dir_list)) {
- 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) {
- my $fullpath = &prepend_group($current_path.$fname.'.'.$extension);
- push(@{ $versioned{$fullpath} },
- [$filename,$dom,$testdir,$size,$mtime,$obs,]);
- } else {
- push(@dir_lines, [$filename,$dom,$testdir,$size,$mtime,$obs]);
- }
+ if (ref($dir_list) eq 'ARRAY') {
+ foreach my $dir_line (sort
+ {
+ my ($afile)=split('&',$a,2);
+ my ($bfile)=split('&',$b,2);
+ return (lc($afile) cmp lc($bfile));
+ } (@{$dir_list})) {
+ 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) {
+ my $fullpath = &prepend_group($current_path.$fname.'.'.$extension);
+ push(@{ $versioned{$fullpath} },
+ [$filename,$dom,$testdir,$size,$mtime,$obs,]);
+ } else {
+ push(@dir_lines, [$filename,$dom,$testdir,$size,$mtime,$obs]);
+ }
+ }
}
my $zerobyte;
foreach my $dir_line (@dir_lines) {
@@ -883,7 +885,7 @@ sub display_access {
}
$info .= "
".&Apache::lonnet::absolute_url($ENV{'SERVER_NAME'})."/adm/$udom/$uname/aboutme
";
if ($group ne '') {
- $info .= &mt("Users with privileges to edit course contents may add a group portfolio page to a course using the Course Editor").'
';
+ $info .= &mt("Users with privileges to edit course contents may add a course information page to a course using the 'Course Info' button in DOCS").'
';
}
} else {
$header = '