--- rat/lonpage.pm 2022/09/19 20:01:39 1.111.2.13.2.3 +++ rat/lonpage.pm 2022/10/05 22:59:06 1.111.2.13.2.4 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Page Handler # -# $Id: lonpage.pm,v 1.111.2.13.2.3 2022/09/19 20:01:39 raeburn Exp $ +# $Id: lonpage.pm,v 1.111.2.13.2.4 2022/10/05 22:59:06 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -686,7 +686,7 @@ ENDEXT # ---------------------------------------------------------------- End SSI cell } } - } + } } unless ($contents) { &Apache::loncommon::content_type($r,'text/html'); @@ -968,9 +968,26 @@ ENDEXT } # ------------------------------------------------------------- End render page } else { - &Apache::loncommon::content_type($r,'text/html'); - $r->send_http_header; - &Apache::lonsequence::viewmap($r,$requrl); + if ($hash{'map_type_'.$hash{'map_pc_'.$requrl}} eq 'none') { + &Apache::loncommon::content_type($r,'text/html'); + $r->send_http_header; + $r->print(&Apache::loncommon::start_page(undef,undef, + {'force_register' => 1,})); + my $crstype = &Apache::loncommon::course_type(); + if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { + $r->print(''.&mt('Missing composite page file.').'
'. + &mt("You may want to use the $crstype Editor to remove this item.")); + } else { + $r->print(''. + &mt('This resource was unavailable when your '.lc($crstype).' session was loaded').'
'. + &mt("Please use 'Contents' to list items available in the $crstype.").'
'); + } + $r->print(&Apache::loncommon::end_page()); + } else { + &Apache::loncommon::content_type($r,'text/html'); + $r->send_http_header; + &Apache::lonsequence::viewmap($r,$requrl); + } } # ------------------------------------------------------------------ Untie hash unless (untie(%hash)) {