version 1.104, 2006/06/16 22:37:10
|
version 1.106, 2006/06/20 03:02:33
|
Line 166 sub display_directory {
|
Line 166 sub display_directory {
|
} |
} |
my $href_location="/uploaded/$udom/$uname/$port_path".$current_path; |
my $href_location="/uploaded/$udom/$uname/$port_path".$current_path; |
my $href_edit_location="/editupload/$udom/$uname/$port_path".$current_path; |
my $href_edit_location="/editupload/$udom/$uname/$port_path".$current_path; |
|
my @dir_lines; |
|
my %versioned; |
foreach my $line (sort |
foreach my $line (sort |
{ |
{ |
my ($afile)=split('&',$a,2); |
my ($afile)=split('&',$a,2); |
Line 176 sub display_directory {
|
Line 178 sub display_directory {
|
#$dom |
#$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(/\&/,$line,16); |
$filename =~ s/\s+$//; |
$filename =~ s/\s+$//; |
|
my ($fname,$version,$extension) = &Apache::grades::file_name_version_ext($filename); |
|
if ($version) { |
|
$versioned{$fname} .= $version.","; |
|
} |
|
push(@dir_lines, [$filename,$dom,$testdir,$size,$mtime,$obs]); |
|
} |
|
foreach my $line (@dir_lines) { |
|
my ($filename,$dom,$testdir,$size,$mtime,$obs) = @$line; |
|
my ($fname,$version,$extension) = &Apache::grades::file_name_version_ext($filename); |
if (($filename ne '.') && ($filename ne '..') && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(\d+)\.([^\.]*)$/)) { |
if (($filename ne '.') && ($filename ne '..') && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(\d+)\.([^\.]*)$/)) { |
if ($dirptr&$testdir) { |
if ($dirptr&$testdir) { |
if ($select_mode eq 'true'){ |
if ($select_mode eq 'true'){ |
Line 188 sub display_directory {
|
Line 199 sub display_directory {
|
$r->print('</tr>'); |
$r->print('</tr>'); |
} else { |
} else { |
$r->print('<tr bgcolor="#CCCCFF">'); |
$r->print('<tr bgcolor="#CCCCFF">'); |
my $fullpath = $current_path.$filename; |
my $version_flag; |
|
if (exists($versioned{$fname})) { |
|
$version_flag = "*"; |
|
} else { |
|
$version_flag = ""; |
|
} |
|
my $fullpath = $current_path.$filename; |
$fullpath = &prepend_group($fullpath,$group); |
$fullpath = &prepend_group($fullpath,$group); |
if ($select_mode eq 'true'){ |
if ($select_mode eq 'true'){ |
$r->print('<td><input type="checkbox" name="checkfile" value="'.$filename.'"'); |
$r->print('<td><input type="checkbox" name="checkfile" value="'.$filename.'"'); |