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

raeburn raeburn@source.lon-capa.org
Sat, 13 Nov 2010 02:04:40 -0000


raeburn		Sat Nov 13 02:04:40 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	lonprintout.pm 
  Log:
  - Backport 1.585. 
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.568.2.10 loncom/interface/lonprintout.pm:1.568.2.11
--- loncom/interface/lonprintout.pm:1.568.2.10	Sat Nov 13 01:57:14 2010
+++ loncom/interface/lonprintout.pm	Sat Nov 13 02:04:39 2010
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.568.2.10 2010/11/13 01:57:14 raeburn Exp $
+# $Id: lonprintout.pm,v 1.568.2.11 2010/11/13 02:04:39 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3012,6 +3012,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 {
@@ -3729,7 +3734,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>'