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

raeburn raeburn at source.lon-capa.org
Sun Sep 21 12:26:20 EDT 2014


raeburn		Sun Sep 21 16:26:20 2014 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  - Message displayed in printout when there were no resources to print
    better tailored to printing context. 
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.642 loncom/interface/lonprintout.pm:1.643
--- loncom/interface/lonprintout.pm:1.642	Thu Apr 24 15:31:39 2014
+++ loncom/interface/lonprintout.pm	Sun Sep 21 16:26:20 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.642 2014/04/24 15:31:39 raeburn Exp $
+# $Id: lonprintout.pm,v 1.643 2014/09/21 16:26:20 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3615,6 +3615,7 @@
     my $current_assignment = "";
     my $assignment;
     my $courseidinfo = &get_course();
+    my $possprint = scalar(@{$master_seq});
 
     foreach my $curresline (@{$master_seq})  {
 	if (defined $page_breaks{$curresline}) {
@@ -3756,7 +3757,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