--- rat/lonpage.pm 2004/08/29 18:45:52 1.58 +++ rat/lonpage.pm 2004/12/10 19:29:19 1.63 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Page Handler # -# $Id: lonpage.pm,v 1.58 2004/08/29 18:45:52 raeburn Exp $ +# $Id: lonpage.pm,v 1.63 2004/12/10 19:29:19 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -232,9 +232,13 @@ sub handler { $lcm*=($#colcont+1)/euclid($lcm,($#colcont+1)); foreach (@colcont) { my $src=$hash{'src_'.$_}; - $src=~/\.(\w+)$/; + my ($extension)=($src=~/\.(\w+)$/); + if ($hash{'encrypted_'.$_}) { + $src=&Apache::lonenc::encrypted($src); + } $metalink{$_}=$src.'.meta'; - $cellemb{$_}=Apache::loncommon::fileembstyle($1); + $cellemb{$_}= + &Apache::loncommon::fileembstyle($extension); if ($cellemb{$_} eq 'ssi') { # --------------------------------------------------------- This is an SSI cell my $prefix=$_.'_'; @@ -257,8 +261,7 @@ sub handler { } } my $output=Apache::lonnet::ssi($src,%posthash); - $output=~ - s/\/\/ BEGIN LON\-CAPA Internal.+\/\/ END LON\-CAPA Internal\s//gs; + $output=~s|//(\s*)?\s||gs; if ($target eq 'tex') { $output =~ s/^([^&]+)\\begin{document}//; $output =~ s/\\end{document}//; @@ -351,7 +354,17 @@ sub handler { unless ($contents) { &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; - $r->print('
'.&mt('Empty page').'.'); + $r->print(''."\n". + ''."\n". + &Apache::lonmenu::registerurl(1,undef)."\n". + ''."\n". + ''. + &Apache::lonmenu::menubuttons(undef,$target,1) + ); + $r->print(&mt('This page is either empty or it only contains resources that are currently hidden').'. '); + $r->print('