version 1.596.2.12.2.60.2.7, 2025/01/17 03:46:07
|
version 1.596.2.12.2.60.2.9, 2025/01/18 21:29:42
|
Line 1414 sub do_passback {
|
Line 1414 sub do_passback {
|
} |
} |
$value=~s/\&$//; |
$value=~s/\&$//; |
&Apache::lonnet::courselog(&escape($linkuri).':'.$uname.':'.$udom.':EXPORT:'.$value); |
&Apache::lonnet::courselog(&escape($linkuri).':'.$uname.':'.$udom.':EXPORT:'.$value); |
&Apache::lonnet::cstore({'score' => $score},$chosen,$namespace,$udom,$uname,'',$pb{'ip'},1); |
&Apache::lonnet::store_userdata({'score' => $score},$chosen,$namespace,$udom,$uname,$pb{'ip'}); |
$ctr++; |
$ctr++; |
if ($ctr%2 ==1) { |
if ($ctr%2 ==1) { |
$outcome .= &Apache::loncommon::start_data_table_row(); |
$outcome .= &Apache::loncommon::start_data_table_row(); |
Line 1881 sub process_passbacks {
|
Line 1881 sub process_passbacks {
|
} |
} |
$value=~s/\&$//; |
$value=~s/\&$//; |
&Apache::lonnet::courselog(&escape($pb{'linkuri'}).':'.$uname.':'.$udom.':EXPORT:'.$value); |
&Apache::lonnet::courselog(&escape($pb{'linkuri'}).':'.$uname.':'.$udom.':EXPORT:'.$value); |
&Apache::lonnet::cstore({'score' => $score},$launcher,$namespace,$udom,$uname,'',$pb{'ip'},1); |
&Apache::lonnet::store_userdata({'score' => $score},$launcher,$namespace,$udom,$uname,$pb{'ip'}); |
} else { |
} else { |
$no_passback = 1; |
$no_passback = 1; |
} |
} |
Line 4461 sub processHandGrade {
|
Line 4461 sub processHandGrade {
|
|
|
#---- Save the score and award for each student, if changed |
#---- Save the score and award for each student, if changed |
sub saveHandGrade { |
sub saveHandGrade { |
my ($request,$symb,$stuname,$domain,$newflg,$submitter,$part,$queueable,$needpb,$skip_passback,$pbsave) = @_; |
my ($request,$symb,$stuname,$domain,$newflg,$submitter, |
|
$part,$queueable,$needpb,$skip_passback,$pbsave) = @_; |
my @version_parts; |
my @version_parts; |
my $usec = &Apache::lonnet::getsection($domain,$stuname, |
my $usec = &Apache::lonnet::getsection($domain,$stuname, |
$env{'request.course.id'}); |
$env{'request.course.id'}); |
Line 4469 sub saveHandGrade {
|
Line 4470 sub saveHandGrade {
|
my %record = &Apache::lonnet::restore($symb,$env{'request.course.id'},$domain,$stuname); |
my %record = &Apache::lonnet::restore($symb,$env{'request.course.id'},$domain,$stuname); |
my @parts_graded; |
my @parts_graded; |
my %newrecord = (); |
my %newrecord = (); |
my ($pts,$wgt,$totchg,$sendupdate) = ('','',0,0); |
my ($pts,$wgt,$totchg,$sendupdate,$poss_pb) = ('','',0,0,0); |
my %aggregate = (); |
my %aggregate = (); |
my $aggregateflag = 0; |
my $aggregateflag = 0; |
if ($env{'form.HIDE'.$newflg}) { |
if ($env{'form.HIDE'.$newflg}) { |
Line 4477 sub saveHandGrade {
|
Line 4478 sub saveHandGrade {
|
my $numchgs = &makehidden($version,$parts,\%record,$symb,$domain,$stuname,1); |
my $numchgs = &makehidden($version,$parts,\%record,$symb,$domain,$stuname,1); |
$totchg += $numchgs; |
$totchg += $numchgs; |
} |
} |
|
if ((ref($needpb) eq 'HASH') && (keys(%{$needpb}))) { |
|
$poss_pb = 1; |
|
} |
my (%weights,%awardeds,%excuseds); |
my (%weights,%awardeds,%excuseds); |
my @parts = split(/:/,$env{'form.partlist'.$newflg}); |
my @parts = split(/:/,$env{'form.partlist'.$newflg}); |
foreach my $new_part (@parts) { |
foreach my $new_part (@parts) { |
#collaborator ($submitter may vary for different parts) |
#collaborator ($submitter may vary for different parts) |
if ($submitter && $new_part ne $part) { next; } |
if ($submitter && $new_part ne $part) { next; } |
my $dropMenu = $env{'form.GD_SEL'.$newflg.'_'.$new_part}; |
my $dropMenu = $env{'form.GD_SEL'.$newflg.'_'.$new_part}; |
if ($env{'form.WGT'.$newflg.'_'.$new_part} eq '') { |
if ($poss_pb) { |
|
$weights{$symb}{$new_part} = |
|
&Apache::lonnet::EXT('resource.'.$new_part.'.weight',$symb,$udom,$uname); |
|
} elsif ($env{'form.WGT'.$newflg.'_'.$new_part} eq '') { |
$weights{$symb}{$new_part} = 1; |
$weights{$symb}{$new_part} = 1; |
} else { |
} else { |
$weights{$symb}{$new_part} = $env{'form.WGT'.$newflg.'_'.$new_part}; |
$weights{$symb}{$new_part} = $env{'form.WGT'.$newflg.'_'.$new_part}; |
Line 4594 sub saveHandGrade {
|
Line 4601 sub saveHandGrade {
|
&Apache::lonnet::cinc('nohist_resourcetracker',\%aggregate, |
&Apache::lonnet::cinc('nohist_resourcetracker',\%aggregate, |
$cdom,$cnum); |
$cdom,$cnum); |
} |
} |
if (($sendupdate || $totchg) && (!$submitter)) { |
if (($sendupdate || $totchg) && (!$submitter) && ($poss_pb)) { |
if ((ref($needpb) eq 'HASH') && |
&process_passbacks('handgrade',[$symb],$cdom,$cnum,$domain,$stuname,$usec,\%weights, |
(keys(%{$needpb}))) { |
\%awardeds,\%excuseds,$needpb,$skip_passback,$pbsave); |
&process_passbacks('handgrade',[$symb],$cdom,$cnum,$domain,$stuname,$usec,\%weights, |
|
\%awardeds,\%excuseds,$needpb,$skip_passback,$pbsave); |
|
} |
|
} |
} |
return ('',$pts,$wgt,$totchg,$sendupdate); |
return ('',$pts,$wgt,$totchg,$sendupdate); |
} |
} |