version 1.727, 2014/11/21 17:59:11
|
version 1.728, 2014/11/24 02:36:26
|
Line 3020 sub saveHandGrade {
|
Line 3020 sub saveHandGrade {
|
my $aggregateflag = 0; |
my $aggregateflag = 0; |
if ($env{'form.HIDE'.$newflg}) { |
if ($env{'form.HIDE'.$newflg}) { |
my ($version,$parts) = split(/:/,$env{'form.HIDE'.$newflg},2); |
my ($version,$parts) = split(/:/,$env{'form.HIDE'.$newflg},2); |
my $numchgs = &makehidden($version,$parts,\%record,$symb,$domain,$stuname); |
my $numchgs = &makehidden($version,$parts,\%record,$symb,$domain,$stuname,1); |
$totchg += $numchgs; |
$totchg += $numchgs; |
} |
} |
my @parts = split(/:/,$env{'form.partlist'.$newflg}); |
my @parts = split(/:/,$env{'form.partlist'.$newflg}); |
Line 3129 sub saveHandGrade {
|
Line 3129 sub saveHandGrade {
|
} |
} |
|
|
sub makehidden { |
sub makehidden { |
my ($version,$parts,$record,$symb,$domain,$stuname) = @_; |
my ($version,$parts,$record,$symb,$domain,$stuname,$tolog) = @_; |
return unless (ref($record) eq 'HASH'); |
return unless (ref($record) eq 'HASH'); |
my %modified; |
my %modified; |
my $numchanged = 0; |
my $numchanged = 0; |
Line 3150 sub makehidden {
|
Line 3150 sub makehidden {
|
} |
} |
if (keys(%modified)) { |
if (keys(%modified)) { |
if (&Apache::lonnet::putstore($env{'request.course.id'},$symb,$version,\%modified, |
if (&Apache::lonnet::putstore($env{'request.course.id'},$symb,$version,\%modified, |
$domain,$stuname) eq 'ok') { |
$domain,$stuname,$tolog) eq 'ok') { |
$numchanged ++; |
$numchanged ++; |
} |
} |
} |
} |
Line 5064 sub updateGradeByPage {
|
Line 5064 sub updateGradeByPage {
|
if ($env{'form.HIDE'.$prob}) { |
if ($env{'form.HIDE'.$prob}) { |
my %record = &Apache::lonnet::restore($symbx,$env{'request.course.id'},$udom,$uname); |
my %record = &Apache::lonnet::restore($symbx,$env{'request.course.id'},$udom,$uname); |
my ($version,$parts) = split(/:/,$env{'form.HIDE'.$prob},2); |
my ($version,$parts) = split(/:/,$env{'form.HIDE'.$prob},2); |
my $numchgs = &makehidden($version,$parts,\%record,$symbx,$udom,$uname); |
my $numchgs = &makehidden($version,$parts,\%record,$symbx,$udom,$uname,1); |
$hideflag += $numchgs; |
$hideflag += $numchgs; |
} |
} |
foreach my $partid (@{$parts}) { |
foreach my $partid (@{$parts}) { |