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

raeburn raeburn at source.lon-capa.org
Thu Jun 4 09:03:36 EDT 2015


raeburn		Thu Jun  4 13:03:36 2015 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonprintout.pm 
  Log:
  - For 2.11
    - Backport 1.646, 1.647
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.627.2.14 loncom/interface/lonprintout.pm:1.627.2.15
--- loncom/interface/lonprintout.pm:1.627.2.14	Wed Mar 11 04:15:47 2015
+++ loncom/interface/lonprintout.pm	Thu Jun  4 13:03:36 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.627.2.14 2015/03/11 04:15:47 raeburn Exp $
+# $Id: lonprintout.pm,v 1.627.2.15 2015/06/04 13:03:36 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -701,12 +701,12 @@
     }
 }
 #
-#  When printing for students, the resoures and order of the
+#  When printing for students, the resources and order of the
 #  resources may need to be altered if there are folders with
 #  random selectiopn or random ordering (or both) enabled.
 #  This sub computes the set of resources to print for a student
 #  modified both by random ordering and selection and filtered
-#  to only those that are in the original set selcted to be printed.
+#  to only those that are in the original set selected to be printed.
 #
 # Parameters:
 #   $map - The URL of the folder being printed.
@@ -717,6 +717,9 @@
 #   $who   - Student/domain for whome the sequence will be generated.
 #   $code  - CODE being printed when printing Problems/Resources
 #            from folder for CODEd assignments
+#   $nohidemap - If true, parameter in map for hiddenresource will be
+#                ignored.  The user calling the routine should have
+#                both the pav and vgr privileges if this is set to true).
 #
 # Implicit inputs:
 #   $
@@ -738,7 +741,7 @@
     my @output_seq;
 
     my $unhidden;
-    if ($perm{'pav'} && $perm{'vgr'} && $nohidemap) {
+    if ($nohidemap) {
         $unhidden = &Apache::lonnet::clutter($map);
     }
     
@@ -3184,6 +3187,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) {
@@ -3201,7 +3208,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,
@@ -3312,6 +3319,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') { 
@@ -3324,7 +3335,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