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

raeburn raeburn@source.lon-capa.org
Tue, 09 Nov 2010 19:19:25 -0000


raeburn		Tue Nov  9 19:19:25 2010 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/interface	lonprintout.pm 
  Log:
  - Backport 1.585.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.583.2.3 loncom/interface/lonprintout.pm:1.583.2.4
--- loncom/interface/lonprintout.pm:1.583.2.3	Thu Sep  2 00:17:36 2010
+++ loncom/interface/lonprintout.pm	Tue Nov  9 19:19:25 2010
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.583.2.3 2010/09/02 00:17:36 raeburn Exp $
+# $Id: lonprintout.pm,v 1.583.2.4 2010/11/09 19:19:25 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3142,6 +3142,11 @@
 	$perm{'pfo'}=&Apache::lonnet::allowed('pfo',
 		  $env{'request.course.id'}.'/'.$env{'request.course.sec'});
     }
+    $perm{'vgr'}=&Apache::lonnet::allowed('vgr',$env{'request.course.id'});
+    if (!$perm{'vgr'}) {
+        $perm{'vgr'}=&Apache::lonnet::allowed('vgr',
+                   $env{'request.course.id'}.'/'.$env{'request.course.sec'});
+    }
 }
 
 sub get_randomly_ordered_warning {
@@ -3881,7 +3886,7 @@
     my $startedTable = 0; # have we started an HTML table yet? (need
                           # to close it later)
 
-    if (($perm{'pav'} and &Apache::lonnet::allowed('vgr',$env{'request.course.id'})) or 
+    if (($perm{'pav'} and $perm{'vgr'}) or 
 	($helper->{VARS}->{'construction'} eq '1')) {
 	&addMessage('<br />'
                    .'<h3>'.&mt('Print Options').'</h3>'