version 1.263, 2005/04/12 16:54:52
|
version 1.264, 2005/04/29 17:02:06
|
Line 2181 sub saveHandGrade {
|
Line 2181 sub saveHandGrade {
|
if (scalar(@v_flag)) { |
if (scalar(@v_flag)) { |
&version_portfiles(\%record, \@parts_graded, $env{'request.course.id'}, $symb, $domain, $stuname, \@v_flag); |
&version_portfiles(\%record, \@parts_graded, $env{'request.course.id'}, $symb, $domain, $stuname, \@v_flag); |
} |
} |
&Apache::lonnet::unmark_as_readonly($domain,$stuname,$symb.$env{'request.course.id'}); |
|
&Apache::lonnet::cstore(\%newrecord,$symb, |
&Apache::lonnet::cstore(\%newrecord,$symb, |
$env{'request.course.id'},$domain,$stuname); |
$env{'request.course.id'},$domain,$stuname); |
} |
} |
Line 2197 sub version_portfiles {
|
Line 2196 sub version_portfiles {
|
$stuname). |
$stuname). |
'/userfiles/portfolio'; |
'/userfiles/portfolio'; |
foreach my $key(keys %$record) { |
foreach my $key(keys %$record) { |
#&Apache::lonnet::logthis("key is $key, value is $$record{$key}"); |
|
my $new_portfiles; |
my $new_portfiles; |
if ($key =~ /^resource\.($version_parts)\./ && $key =~ /\.portfiles$/ ) { |
if ($key =~ /^resource\.($version_parts)\./ && $key =~ /\.portfiles$/ ) { |
my @v_portfiles; |
my @v_portfiles; |
my @portfiles = split(/,/,$$record{$key}); |
my @portfiles = split(/,/,$$record{$key}); |
|
# &Apache::lonnet::logthis("should be unmarking and remarking"); |
foreach my $file (@portfiles) { |
foreach my $file (@portfiles) { |
|
&Apache::lonnet::unmark_as_readonly($domain,$stuname,[$symb,$env{'request.course.id'}],$file); |
my ($directory,$answer_file) =($file =~ /^(.*?)([^\/]*$)/); |
my ($directory,$answer_file) =($file =~ /^(.*?)([^\/]*$)/); |
my $version = 0; |
my $version = 0; |
my @answer_file_parts = split(/\./, $answer_file); |
my @answer_file_parts = split(/\./, $answer_file); |
Line 2231 sub version_portfiles {
|
Line 2231 sub version_portfiles {
|
my $copy_result = &Apache::lonnet::finishuserfileupload($stuname,$domain,$home_server,'copy', |
my $copy_result = &Apache::lonnet::finishuserfileupload($stuname,$domain,$home_server,'copy', |
'/portfolio'.$directory.$answer_file_parts[0].'.'.$version.'.'.$answer_file_parts[-1]); |
'/portfolio'.$directory.$answer_file_parts[0].'.'.$version.'.'.$answer_file_parts[-1]); |
push(@v_portfiles, $answer_file_parts[0].'.'.$version.'.'.$answer_file_parts[-1]); |
push(@v_portfiles, $answer_file_parts[0].'.'.$version.'.'.$answer_file_parts[-1]); |
|
&Apache::lonnet::mark_as_readonly($domain,$stuname, |
|
['/portfolio'.$directory.$answer_file_parts[0].'.'.$version.'.'.$answer_file_parts[-1]], |
|
[$symb,$env{'request.course.id'},'graded']); |
} |
} |
} |
} |
$$record{$key} = join(',',@v_portfiles); |
$$record{$key} = join(',',@v_portfiles); |