version 1.259, 2005/04/07 22:44:03
|
version 1.260, 2005/04/07 22:48:06
|
Line 2175 sub saveHandGrade {
|
Line 2175 sub saveHandGrade {
|
# unless problem has been graded, set flag to version the submitted files |
# unless problem has been graded, set flag to version the submitted files |
unless ($record{'resource.'.$new_part.'.solved'} =~ /^correct_/ || $record{'resource.'.$new_part.'.solved'} eq 'incorrect_by_override') { |
unless ($record{'resource.'.$new_part.'.solved'} =~ /^correct_/ || $record{'resource.'.$new_part.'.solved'} eq 'incorrect_by_override') { |
$v_flag = 1; |
$v_flag = 1; |
&Apache::lonnet::logthis("v_flag is $v_flag"); |
|
&Apache::lonnet::logthis('the record info is '.$record{'resource.'.$new_part.'.solved'}); |
|
} else { |
|
&Apache::lonnet::logthis('the record info is '.$record{'resource.'.$new_part.'.solved'}); |
|
} |
} |
} |
} |
if (scalar(keys(%newrecord)) > 0) { |
if (scalar(keys(%newrecord)) > 0) { |
if ($v_flag) { |
if ($v_flag) { |
&Apache::lonnet::logthis("v_flag (setting stuff) is $v_flag"); |
|
&Apache::lonnet::unmark_as_readonly($domain,$stuname,$symb.$env{'request.course.id'}); |
&Apache::lonnet::unmark_as_readonly($domain,$stuname,$symb.$env{'request.course.id'}); |
&version_portfiles(\%record, \@parts_graded, $env{'request.course.id'}, $symb, $domain, $stuname); |
&version_portfiles(\%record, \@parts_graded, $env{'request.course.id'}, $symb, $domain, $stuname); |
} |
} |
Line 2204 sub version_portfiles {
|
Line 2199 sub version_portfiles {
|
#&Apache::lonnet::logthis("key is $key, value is $$record{$key}"); |
#&Apache::lonnet::logthis("key is $key, value is $$record{$key}"); |
my $new_portfiles; |
my $new_portfiles; |
if ($key =~ /^resource\.($parts)\./ && $key =~ /\.portfiles$/) { |
if ($key =~ /^resource\.($parts)\./ && $key =~ /\.portfiles$/) { |
|
|
my @v_portfiles; |
my @v_portfiles; |
my @portfiles = split(/,/,$$record{$key}); |
my @portfiles = split(/,/,$$record{$key}); |
foreach my $file (@portfiles) { |
foreach my $file (@portfiles) { |
Line 2236 sub version_portfiles {
|
Line 2230 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::logthis('copy result is '.$copy_result); |
|
&Apache::lonnet::logthis('answer file is '.$answer_file. |
|
' becomes '.$answer_file_parts[0].'.'.$version.'.'.$answer_file_parts[-1]); |
|
} |
} |
} |
} |
$$record{$key} = join(/,/,@v_portfiles); |
$$record{$key} = join(/,/,@v_portfiles); |