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

raeburn raeburn at source.lon-capa.org
Sun Sep 21 12:32:27 EDT 2014


raeburn		Sun Sep 21 16:32:27 2014 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonprintout.pm 
  Log:
  - For 2.11
    -Backport 1.643
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.627.2.12 loncom/interface/lonprintout.pm:1.627.2.13
--- loncom/interface/lonprintout.pm:1.627.2.12	Thu Apr 24 15:36:58 2014
+++ loncom/interface/lonprintout.pm	Sun Sep 21 16:32:26 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.627.2.12 2014/04/24 15:36:58 raeburn Exp $
+# $Id: lonprintout.pm,v 1.627.2.13 2014/09/21 16:32:26 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3621,6 +3621,7 @@
     my $current_assignment = "";
     my $assignment;
     my $courseidinfo = &get_course();
+    my $possprint = scalar(@{$master_seq});
     if (defined($courseidinfo)) { $courseidinfo=' - '.$courseidinfo }
     if ($usersection ne '') {$courseidinfo.=' - Sec. '.$usersection}
 
@@ -3764,7 +3765,24 @@
     #
 
     if ($actually_printed == 0) {
-	$current_output  = &encapsulate_minipage("\\vskip -10mm \nNo incomplete resources\n \\vskip 100 mm { }\n");
+        my $message = &mt('No resources to print');
+        if (!$possprint) {
+            if ($perm{'pav'} || $perm{'pfo'}) {
+                $message = &mt('There are no unhidden resources to print.')."\n\n".
+                           &mt('The most likely reason is one of the following: ')."\n".
+                           '\begin{itemize}'."\n".
+                           '\item '.&mt("The 'Resource hidden from students' parameter is set for the folder being printed.")."\n".
+                           '\item '.&mt("'Hidden' is checked in the Course Editor individually for each resource in the folder being printed.")."\n".
+                           '\end{itemize}'."\n\n".
+                           &mt("Note: to print a bubblesheet exam which you want to hide from students, ".
+                               "use the Course Editor to check the 'Hidden' checkbox for the exam folder itself.")."\n";
+            }
+        } elsif ($print_incomplete) {
+            $message = &mt('No incomplete resources');
+        }
+        if ($message) {
+            $current_output  = &encapsulate_minipage("\\vskip -10mm \n$message\n \\vskip 100 mm { }\n");
+        }
 	if ($remove_latex_header eq "NO") {
 	    $current_output = &print_latex_header() . $current_output;
 	} else {




More information about the LON-CAPA-cvs mailing list