--- loncom/homework/grades.pm 2024/12/10 17:04:38 1.803 +++ loncom/homework/grades.pm 2024/12/10 18:38:10 1.804 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.803 2024/12/10 17:04:38 raeburn Exp $ +# $Id: grades.pm,v 1.804 2024/12/10 18:38:10 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -12591,6 +12591,10 @@ sub assign_clicker_grades { if ($res_error) { return &navmap_errormsg(); } + my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; + my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; + my %needpb = &passbacks_for_symb($cdom,$cnum,$symb); + my (%skip_passback,%pbsave); # FIXME: This should probably look for the first handgradeable part my $part=$$partlist[0]; # Start screen output @@ -12700,7 +12704,15 @@ sub assign_clicker_grades { $result.="
Failed to save student $username:$domain. Message when trying to save was ($returncode)"; } else { $storecount++; - #FIXME Do passback for $user if required + if (keys(%needpb)) { + my (%weights,%awardeds,%excuseds); + my $usec = &Apache::lonnet::getsection($domain,$username,$env{'request.course.id'}); + $weights{$symb}{$part} = &Apache::lonnet::EXT("resource.$part.weight",$symb,$domain,$username,$usec); + $awardeds{$symb}{$part} = $ave; + $excuseds{$symb}{$part} = ''; + &process_passbacks('clickergrade',[$symb],$cdom,$cnum,$domain,$username,$usec,\%weights, + \%awardeds,\%excuseds,\%needpb,\%skip_passback,\%pbsave); + } } } }