version 1.342, 2006/03/28 00:46:20
|
version 1.343, 2006/03/28 17:54:44
|
Line 2364 sub saveHandGrade {
|
Line 2364 sub saveHandGrade {
|
|
|
if (scalar(keys(%newrecord)) > 0) { |
if (scalar(keys(%newrecord)) > 0) { |
if (scalar(@version_parts)) { |
if (scalar(@version_parts)) { |
&version_portfiles(\%record, \%newrecord, \@parts_graded, $env{'request.course.id'}, $symb, $domain, $stuname, \@version_parts); |
my @changed_keys = &version_portfiles(\%record, \@parts_graded, $env{'request.course.id'}, $symb, $domain, $stuname, \@version_parts); |
|
foreach my $key(@changed_keys) { |
|
$newrecord{$key} = $record{$key}; |
|
} |
} |
} |
&Apache::lonnet::cstore(\%newrecord,$symb, |
&Apache::lonnet::cstore(\%newrecord,$symb, |
$env{'request.course.id'},$domain,$stuname); |
$env{'request.course.id'},$domain,$stuname); |
Line 2504 sub get_last_resets {
|
Line 2507 sub get_last_resets {
|
|
|
# ----------- Handles creating versions for portfolio files as answers |
# ----------- Handles creating versions for portfolio files as answers |
sub version_portfiles { |
sub version_portfiles { |
my ($record, $newrecord, $parts_graded, $courseid, $symb, $domain, $stu_name, $v_flag) = @_; |
my ($record, $parts_graded, $courseid, $symb, $domain, $stu_name, $v_flag) = @_; |
my $version_parts = join('|',@$v_flag); |
my $version_parts = join('|',@$v_flag); |
|
my @returned_keys; |
my $parts = join('|', @$parts_graded); |
my $parts = join('|', @$parts_graded); |
my $portfolio_root = &Apache::loncommon::propath($domain, |
my $portfolio_root = &Apache::loncommon::propath($domain, |
$stu_name). |
$stu_name). |
Line 2530 sub version_portfiles {
|
Line 2534 sub version_portfiles {
|
[$symb,$env{'request.course.id'},'graded']); |
[$symb,$env{'request.course.id'},'graded']); |
} |
} |
} |
} |
$$newrecord{$key} = join(',',@versioned_portfiles); |
$$record{$key} = join(',',@versioned_portfiles); |
|
push(@returned_keys,$key); |
} |
} |
} |
} |
return 'ok'; |
return (@returned_keys); |
} |
} |
|
|
sub get_next_version { |
sub get_next_version { |