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

raeburn raeburn at source.lon-capa.org
Thu Jun 4 09:02:22 EDT 2015


raeburn		Thu Jun  4 13:02:22 2015 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  - &master_seq_to_person_seq() is called by grades::users_order(), so
    %perm is empty in that case, so caller of the routine needs to check privs
    if passing $nohidemap arg.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.646 loncom/interface/lonprintout.pm:1.647
--- loncom/interface/lonprintout.pm:1.646	Thu Jun  4 12:51:37 2015
+++ loncom/interface/lonprintout.pm	Thu Jun  4 13:02:22 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.646 2015/06/04 12:51:37 raeburn Exp $
+# $Id: lonprintout.pm,v 1.647 2015/06/04 13:02:22 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -740,7 +740,7 @@
     my @output_seq;
 
     my $unhidden;
-    if ($perm{'pav'} && $perm{'vgr'} && $nohidemap) {
+    if ($nohidemap) {
         $unhidden = &Apache::lonnet::clutter($map);
     }
     
@@ -3181,6 +3181,10 @@
 	 my $student_counter=-1;
 	 my $i = 0;
 	 my $last_section = (split(/:/,$students[0]))[2];
+         my $nohidemap;
+         if ($perm{'pav'} && $perm{'vgr'}) {
+             $nohidemap = 1;
+         }
 	 foreach my $person (@students) {
              my $duefile="/home/httpd/prtspool/$env{'user.name'}_$env{'user.domain'}_printout.due";
 	     if (-e $duefile) {
@@ -3198,7 +3202,7 @@
 		 $i=int($student_counter/$helper->{'VARS'}{'NUMBER_TO_PRINT'});
 	     }
 	     my $actual_seq = master_seq_to_person_seq($map, \@master_seq,
-                                                       $person, undef, 1);
+                                                       $person, undef, $nohidemap);
 	     my ($output,$fullname, $printed)=&print_resources($r,$helper,
 						     $person,$type,
 						     \%moreenv,  $actual_seq,
@@ -3309,6 +3313,10 @@
 	 my $flag_latex_header_remove = 'NO'; 
 	 my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,$num_todo);
 	 my $count=0;
+         my $nohidemap;
+         if ($perm{'pav'} && $perm{'vgr'}) {
+             $nohidemap = 1;
+         }
 	 foreach my $code (sort(@allcodes)) {
 	     my $file_num=int($count/$number_per_page);
 	     if ($code_type eq 'number') { 
@@ -3321,7 +3329,7 @@
                  $env{'form.CODE'} = $moreenv{'CODE'};
                  $actual_seq = master_seq_to_person_seq($map, \@master_seq,
                                                         undef,
-                                                        $moreenv{'CODE'}, 1);
+                                                        $moreenv{'CODE'}, $nohidemap);
                  delete($env{'form.CODE'});
              }
 	     my ($output,$fullname, $printed)=




More information about the LON-CAPA-cvs mailing list