version 1.262, 2005/04/08 20:12:58
|
version 1.263, 2005/04/12 16:54:52
|
Line 2178 sub saveHandGrade {
|
Line 2178 sub saveHandGrade {
|
} |
} |
} |
} |
if (scalar(keys(%newrecord)) > 0) { |
if (scalar(keys(%newrecord)) > 0) { |
if (scalar @v_flag) { |
if (scalar(@v_flag)) { |
foreach my $part_flagged (@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'}); |
|
&version_portfiles(\%record, \@parts_graded, $env{'request.course.id'}, $symb, $domain, $stuname); |
|
} |
|
} |
} |
|
&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 2192 sub saveHandGrade {
|
Line 2190 sub saveHandGrade {
|
|
|
# ----------- Handles creating versions for portfolio files as answers |
# ----------- Handles creating versions for portfolio files as answers |
sub version_portfiles { |
sub version_portfiles { |
my ($record, $parts_graded, $courseid, $symb, $domain, $stuname) = @_; |
my ($record, $parts_graded, $courseid, $symb, $domain, $stuname, $v_flag) = @_; |
|
my $version_parts = join('|',@$v_flag); |
my $parts = join('|', @$parts_graded); |
my $parts = join('|', @$parts_graded); |
my $portfolio_root = &Apache::loncommon::propath($domain, |
my $portfolio_root = &Apache::loncommon::propath($domain, |
$stuname). |
$stuname). |
Line 2200 sub version_portfiles {
|
Line 2199 sub version_portfiles {
|
foreach my $key(keys %$record) { |
foreach my $key(keys %$record) { |
#&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\.($version_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) { |