--- rat/lonpageflip.pm 2021/12/31 19:51:04 1.111 +++ rat/lonpageflip.pm 2022/10/19 00:03:12 1.112 @@ -2,7 +2,7 @@ # # Page flip handler # -# $Id: lonpageflip.pm,v 1.111 2021/12/31 19:51:04 raeburn Exp $ +# $Id: lonpageflip.pm,v 1.112 2022/10/19 00:03:12 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -502,9 +502,13 @@ sub handler { $r->send_http_header; $r->print(&Apache::loncommon::check_release_result(@reinit)); return OK; - } elsif ($reinitcheck eq 'update') { - my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; - my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; + } + my ($cnum,$cdom); + if ($reinitcheck) { + $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; + $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; + } + if (($reinitcheck eq 'main') || ($reinitcheck eq 'both')) { $preupdatepos = &Apache::lonnet::symbread($currenturl); unless ($direction eq 'return') { if (tie(%hash,'GDBM_File',$env{'request.course.fn'}.'_symb.db', @@ -540,6 +544,12 @@ sub handler { } } } + if (($reinitcheck eq 'both') || ($reinitcheck eq 'supp')) { + my ($supplemental,$refs_updated) = &Apache::lonnet::get_supplemental($cnum,$cdom); + unless ($refs_updated) { + &Apache::loncommon::set_supp_httprefs($cnum,$cdom,$supplemental); + } + } } if ($direction eq 'firstres') { my $furl=&first_accessible_resource();