--- rat/lonsequence.pm 2022/10/19 00:03:12 1.57 +++ rat/lonsequence.pm 2022/10/19 18:09:03 1.58 @@ -2,7 +2,7 @@ # # Sequence Handler # -# $Id: lonsequence.pm,v 1.57 2022/10/19 00:03:12 raeburn Exp $ +# $Id: lonsequence.pm,v 1.58 2022/10/19 18:09:03 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -234,9 +234,13 @@ sub handler { $r->send_http_header; $r->print(&Apache::loncommon::check_release_result(@reinit)); return OK; - } elsif (($result eq 'main') || ($result eq 'both')) { - my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; - my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; + } + my ($cnum,$cdom); + if ($result) { + $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; + $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; + } + if (($result eq 'main') || ($result eq 'both')) { my ($furl,$ferr) = &Apache::lonuserstate::readmap("$cdom/$cnum"); if ($ferr) { my $requrl = $r->uri; @@ -245,7 +249,16 @@ sub handler { return HTTP_NOT_ACCEPTABLE; } } - + if (($result eq 'both') || ($result eq 'supp')) { + my $possdel; + if ($result eq 'supp') { + $possdel = 1; + } + my ($supplemental,$refs_updated) = &Apache::lonnet::get_supplemental($cnum,$cdom,'',$possdel); + unless ($refs_updated) { + &Apache::loncommon::set_supp_httprefs($cnum,$cdom,$supplemental,$possdel); + } + } &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header;