--- loncom/interface/lonprintout.pm 2001/12/07 23:16:22 1.9 +++ loncom/interface/lonprintout.pm 2001/12/07 23:35:54 1.10 @@ -16,7 +16,7 @@ package Apache::lonprintout; use strict; -use Apache::Constants qw(:common); +use Apache::Constants qw(:common :http); use Apache::lonxml; use Apache::lonnet; use Apache::File(); @@ -41,9 +41,10 @@ sub menu_for_output { my $r = shift; $r->print(< - Standard LaTeX output for current document

- Standard LaTeX output for the primary sequence

- Standard LaTeX output for the top level sequence

+ + Standard LaTeX output for current document
+ Standard LaTeX output for the primary sequence
+ Standard LaTeX output for the top level sequence
@@ -69,7 +70,12 @@ ENDPART my $filename; if ($choice eq 'Standard LaTeX output for current document') { - my $file=&Apache::lonnet::filelocation("",'/res/'.$ENV{'request.ambiguous'}); + my $access=&Apache::lonnet::allowed('bre',$ENV{'form.url'}); + if (($access ne '2') && ($access ne 'F')) { + $ENV{'user.error.msg'}="$ENV{'form.url'}:bre:1:1:Access Denied"; + return HTTP_NOT_ACCEPTABLE; + } + my $file=&Apache::lonnet::filelocation("",$ENV{'form.url'}); my $filecontents=&Apache::lonnet::getfile($file); $result = &Apache::lonxml::xmlparse('tex',$filecontents,'',%mystyle); } elsif ($choice eq 'Standard LaTeX output for the primary sequence') {