--- loncom/interface/portfolio.pm 2004/08/24 06:43:21 1.25
+++ loncom/interface/portfolio.pm 2004/08/24 06:51:11 1.26
@@ -197,7 +197,12 @@ sub display_directory {
$r->print('
'.
'Actions | | Name | Size | Last Modified |
');
my $href_location="/uploaded/$ENV{'user.domain'}/$ENV{'user.name'}/portfolio/$current_path/";
- foreach my $line (@$dir_list) {
+ foreach my $line (sort
+ {
+ my ($afile)=split('&',$a,2);
+ my ($bfile)=split('&',$b,2);
+ return (lc($afile) cmp lc($bfile));
+ } (@$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);
@@ -319,8 +324,8 @@ sub upload {
sub createdir {
my ($r)=@_;
- #FIXME 1) bad dirnames
- # 2) file exists in place of dir
+ #FIXME 1) bad dirnames ( '/' etc)
+ # 2) file exists in place of dir (errormessage needs improvement)
my $result=&Apache::lonnet::mkdiruserfile($ENV{'user.name'},
$ENV{'user.domain'},'portfolio'.$ENV{'form.currentpath'}.$ENV{'form.newdir'});
if ($result ne 'ok') {