version 1.800, 2024/12/09 22:01:01
|
version 1.802, 2024/12/10 04:55:03
|
Line 1726 sub passbacks_for_symb {
|
Line 1726 sub passbacks_for_symb {
|
} |
} |
|
|
sub process_passbacks { |
sub process_passbacks { |
my ($context,$symbs,$cdom,$cnum,$udom,$uname,$weights,$awardeds,$excuseds,$needpb, |
my ($context,$symbs,$cdom,$cnum,$udom,$uname,$usec,$weights,$awardeds,$excuseds,$needpb, |
$skip_passback,$pbsave,$pbids) = @_; |
$skip_passback,$pbsave,$pbids) = @_; |
if ((ref($needpb) eq 'HASH') && (ref($skip_passback) eq 'HASH') && (ref($pbsave) eq 'HASH')) { |
if ((ref($needpb) eq 'HASH') && (ref($skip_passback) eq 'HASH') && (ref($pbsave) eq 'HASH')) { |
my (%weight,%awarded,%excused); |
my (%weight,%awarded,%excused); |
Line 1827 sub process_passbacks {
|
Line 1827 sub process_passbacks {
|
'uname' => $uname, |
'uname' => $uname, |
'udom' => $udom, |
'udom' => $udom, |
'uhome' => $uhome, |
'uhome' => $uhome, |
|
'usec' => $usec, |
'pbid' => $pbid, |
'pbid' => $pbid, |
'pburl' => $pburl, |
'pburl' => $pburl, |
'pbtype' => $pb{'type'}, |
'pbtype' => $pb{'type'}, |
Line 1840 sub process_passbacks {
|
Line 1841 sub process_passbacks {
|
'total_s' => \%total_by_symb, |
'total_s' => \%total_by_symb, |
'possible_s' => \%possible_by_symb, |
'possible_s' => \%possible_by_symb, |
}; |
}; |
push(@Apache::lonhomework::ltipassback,$ltigrade); |
push(@Apache::grades::ltipassback,$ltigrade); |
next; |
next; |
} |
} |
my ($total,$possible); |
my ($total,$possible); |
Line 4251 sub processHandGrade {
|
Line 4252 sub processHandGrade {
|
if ($message ne '') { |
if ($message ne '') { |
my ($baseurl,$showsymb) = |
my ($baseurl,$showsymb) = |
&get_feedurl_and_symb($symb,$collaborator, |
&get_feedurl_and_symb($symb,$collaborator, |
$udom); |
$udom); |
if ($env{'form.withgrades'.$ctr}) { |
if ($env{'form.withgrades'.$ctr}) { |
$messagetail = " for <a href=\"". |
$messagetail = " for <a href=\"". |
$baseurl."?symb=$showsymb\">$restitle</a>"; |
$baseurl."?symb=$showsymb\">$restitle</a>"; |
Line 4561 sub saveHandGrade {
|
Line 4562 sub saveHandGrade {
|
if (($sendupdate) && (!$submitter)) { |
if (($sendupdate) && (!$submitter)) { |
if ((ref($needpb) eq 'HASH') && |
if ((ref($needpb) eq 'HASH') && |
(keys(%{$needpb}))) { |
(keys(%{$needpb}))) { |
&process_passbacks('handgrade',[$symb],$cdom,$cnum,$domain,$stuname,\%weights, |
&process_passbacks('handgrade',[$symb],$cdom,$cnum,$domain,$stuname,$usec,\%weights, |
\%awardeds,\%excuseds,$needpb,$skip_passback,$pbsave); |
\%awardeds,\%excuseds,$needpb,$skip_passback,$pbsave); |
} |
} |
} |
} |
Line 5650 sub editgrades {
|
Line 5651 sub editgrades {
|
$updateCtr++; |
$updateCtr++; |
if (keys(%needpb)) { |
if (keys(%needpb)) { |
$weights{$symb} = \%weight; |
$weights{$symb} = \%weight; |
&process_passbacks('editgrades',[$symb],$cdom,$cnum,$udom,$uname,\%weights, |
&process_passbacks('editgrades',[$symb],$cdom,$cnum,$udom,$uname,$usec,\%weights, |
\%awardeds,\%excuseds,\%needpb,\%skip_passback,\%pbsave); |
\%awardeds,\%excuseds,\%needpb,\%skip_passback,\%pbsave); |
} |
} |
} else { |
} else { |
Line 6179 sub csvuploadassign {
|
Line 6180 sub csvuploadassign {
|
$request->print('.'); |
$request->print('.'); |
# Remove from grading queue |
# Remove from grading queue |
&Apache::bridgetask::remove_from_queue('gradingqueue',$symb,$cdom,$cnum, |
&Apache::bridgetask::remove_from_queue('gradingqueue',$symb,$cdom,$cnum, |
$domain,$username); |
$domain,$username); |
$countdone++; |
$countdone++; |
if ($passback) { |
if ($passback) { |
my @parts_in_upload; |
my @parts_in_upload; |
Line 6201 sub csvuploadassign {
|
Line 6202 sub csvuploadassign {
|
$awardeds{$symb}{$part} = $record{"resource.$part.awarded"}; |
$awardeds{$symb}{$part} = $record{"resource.$part.awarded"}; |
} |
} |
} |
} |
&process_passbacks('csvupload',[$symb],$cdom,$cnum,$domain,$username,\%weights, |
&process_passbacks('csvupload',[$symb],$cdom,$cnum,$domain,$username,$usec,\%weights, |
\%awardeds,\%excuseds,\%needpb,\%skip_passback,\%pbsave); |
\%awardeds,\%excuseds,\%needpb,\%skip_passback,\%pbsave); |
} |
} |
} else { |
} else { |
Line 6952 sub updateGradeByPage {
|
Line 6953 sub updateGradeByPage {
|
$request->print($hidemsg.$grademsg.$studentTable); |
$request->print($hidemsg.$grademsg.$studentTable); |
|
|
if (@updates) { |
if (@updates) { |
undef(@Apache::lonhomework::ltipassback); |
|
my (@allsymbs,$mapsymb,@recurseup,%parentmapsymbs,%possmappb,%possrespb); |
my (@allsymbs,$mapsymb,@recurseup,%parentmapsymbs,%possmappb,%possrespb); |
@allsymbs = @updates; |
@allsymbs = @updates; |
if (ref($map)) { |
if (ref($map)) { |
Line 7010 sub updateGradeByPage {
|
Line 7010 sub updateGradeByPage {
|
} |
} |
} |
} |
my @symbs = keys(%uniqsymbs); |
my @symbs = keys(%uniqsymbs); |
&process_passbacks('updatebypage',\@symbs,$cdom,$cnum,$udom,$uname,\%weights, |
&process_passbacks('updatebypage',\@symbs,$cdom,$cnum,$udom,$uname,$usec,\%weights, |
\%awardeds,\%excuseds,\%needpb,\%skip_passback,\%pbsave,\%pbids); |
\%awardeds,\%excuseds,\%needpb,\%skip_passback,\%pbsave,\%pbids); |
if (@Apache::lonhomework::ltipassback) { |
if (@Apache::grades::ltipassback) { |
unless ($registered_cleanup) { |
unless ($registered_cleanup) { |
my $handlers = $request->get_handlers('PerlCleanupHandler'); |
my $handlers = $request->get_handlers('PerlCleanupHandler'); |
$request->set_handlers('PerlCleanupHandler' => |
$request->set_handlers('PerlCleanupHandler' => |
[\&Apache::lonhomework::do_ltipassback,@{$handlers}]); |
[\&Apache::grades::make_passback,@{$handlers}]); |
|
$registered_cleanup=1; |
} |
} |
} |
} |
} |
} |
Line 7024 sub updateGradeByPage {
|
Line 7025 sub updateGradeByPage {
|
return ''; |
return ''; |
} |
} |
|
|
|
sub make_passback { |
|
if (@Apache::grades::ltipassback) { |
|
my $lonhost = $Apache::lonnet::perlvar{'lonHostID'}; |
|
my $ip = &Apache::lonnet::get_host_ip($lonhost); |
|
foreach my $item (@Apache::grades::ltipassback) { |
|
&Apache::lonhomework::run_passback($item,$lonhost,$ip); |
|
} |
|
undef(@Apache::grades::ltipassback); |
|
} |
|
} |
|
|
#-------- end of section for handling grading by page/sequence --------- |
#-------- end of section for handling grading by page/sequence --------- |
# |
# |
#------------------------------------------------------------------- |
#------------------------------------------------------------------- |
Line 12808 sub handler {
|
Line 12820 sub handler {
|
&Apache::lonnet::logthis("grades got multiple commands ".join(':',@commands)); |
&Apache::lonnet::logthis("grades got multiple commands ".join(':',@commands)); |
} |
} |
|
|
|
# -------------------------------------- Flag and buffer for registered cleanup |
|
$registered_cleanup=0; |
|
undef(@Apache::grades::ltipassback); |
|
|
# see what the symb is |
# see what the symb is |
|
|
my $symb=$env{'form.symb'}; |
my $symb=$env{'form.symb'}; |