--- loncom/interface/lonquickgrades.pm 2021/11/30 15:55:37 1.122 +++ loncom/interface/lonquickgrades.pm 2022/10/19 00:03:10 1.123 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Quick Student Grades Display # -# $Id: lonquickgrades.pm,v 1.122 2021/11/30 15:55:37 raeburn Exp $ +# $Id: lonquickgrades.pm,v 1.123 2022/10/19 00:03:10 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -120,10 +120,14 @@ sub real_handler { $r->send_http_header; $r->print(&Apache::loncommon::check_release_result(@reinit)); return OK; - } elsif ($reinitresult eq 'update') { - my $cid = $env{'request.course.id'}; - my $cnum = $env{'course.'.$cid.'.num'}; - my $cdom = $env{'course.'.$cid.'.domain'}; + } + my ($cid,$cnum,$cdom); + if ($reinitresult) { + $cid = $env{'request.course.id'}; + $cnum = $env{'course.'.$cid.'.num'}; + $cdom = $env{'course.'.$cid.'.domain'}; + } + if (($reinitresult eq 'main') || ($reinitresult eq 'both')) { &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; &startpage($r,$showPoints); @@ -161,9 +165,15 @@ ENDCLOSE $r->header_out(Location => $furl); return REDIRECT; } + if (($reinitresult eq 'supp') || ($reinitresult eq 'both')) { + my ($supplemental,$refs_updated) = &Apache::lonnet::get_supplemental($cnum,$cdom); + unless ($refs_updated) { + &Apache::loncommon::set_supp_httprefs($cnum,$cdom,$supplemental); + } + } } - unless ($reinitresult eq 'update') { + unless (($reinitresult eq 'main') || ($reinitresult eq 'both')) { # Send header, don't cache this page &Apache::loncommon::no_cache($r); $r->send_http_header;