[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm

sakharuk lon-capa-cvs@mail.lon-capa.org
Tue, 24 Jun 2003 14:07:27 -0000


sakharuk		Tue Jun 24 10:07:27 2003 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Bug 1778 (students can print content of subdirectory) is fixed. I added $ENV{'request.role.adv'} in if block. 
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.193 loncom/interface/lonprintout.pm:1.194
--- loncom/interface/lonprintout.pm:1.193	Mon Jun 23 15:22:00 2003
+++ loncom/interface/lonprintout.pm	Tue Jun 24 10:07:27 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.193 2003/06/23 19:22:00 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.194 2003/06/24 14:07:27 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1023,7 +1023,7 @@
     }
 
     # FIXME: That RE should come from a library somewhere.
-    if (((&Apache::lonnet::allowed('bre',$subdir) eq 'F') and ($helper->{VARS}->{'postdata'}=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)/)) or defined $helper->{'VARS'}->{'construction'}) {    
+    if ((((&Apache::lonnet::allowed('bre',$subdir) eq 'F') and ($helper->{VARS}->{'postdata'}=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)/)) or defined $helper->{'VARS'}->{'construction'}) and $ENV{'request.role.adv'}) {    
         push @{$printChoices}, ["Problems from current subdirectory <b>$subdir</b>", 'problems_from_directory', 'CHOOSE_FROM_SUBDIR'];
         
         my $f = '$filename';