version 1.252, 2005/04/01 23:56:52
|
version 1.253, 2005/04/02 02:22:10
|
Line 2199 sub version_portfiles {
|
Line 2199 sub version_portfiles {
|
my @dir_list = &Apache::lonnet::dirlist($directory,$domain,$stuname,$portfolio_root); |
my @dir_list = &Apache::lonnet::dirlist($directory,$domain,$stuname,$portfolio_root); |
my @file_names; |
my @file_names; |
my @file_name_parts; |
my @file_name_parts; |
foreach ( @dir_list) { |
foreach my $row (@dir_list) { |
@file_names = split /\&/,$_,2; |
@file_names = split (/\&/,$row,2); |
@file_name_parts = split /\./, $file_names[0]; |
@file_name_parts = split (/\./, $file_names[0]); |
# ($file_name_parts[scalar @file_name_parts] eq $answer_file_parts[scalar @answer_file_parts]) |
# ($file_name_parts[scalar @file_name_parts] eq $answer_file_parts[scalar @answer_file_parts]) |
if (($file_name_parts[0] eq $answer_file_parts[0]) && |
if (($file_name_parts[0] eq $answer_file_parts[0]) && |
($file_name_parts[(scalar @file_name_parts)-1] eq $answer_file_parts[(scalar @answer_file_parts)-1])) { |
($file_name_parts[-1] eq $answer_file_parts[-1])) { |
# gets here if filename and extension match, regardless of version |
# gets here if filename and extension match, regardless of version |
if (scalar @file_name_parts == 3) { # a versioned file is found |
if (scalar @file_name_parts == 3) { # a versioned file is found |
# so save it for later |
# so save it for later |