--- rat/lonpage.pm 2004/09/14 01:21:49 1.60 +++ rat/lonpage.pm 2004/11/12 00:21:14 1.61 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Page Handler # -# $Id: lonpage.pm,v 1.60 2004/09/14 01:21:49 raeburn Exp $ +# $Id: lonpage.pm,v 1.61 2004/11/12 00:21:14 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}//; @@ -397,7 +400,8 @@ sub handler { # ------------------------------------------------------------------ Start form if ($nforms) { $r->print('