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

raeburn raeburn at source.lon-capa.org
Wed Jan 15 18:10:25 EST 2025


raeburn		Wed Jan 15 23:10:25 2025 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  - Coding style -- push()
    Remove some trailing white space, and an unnecessary semi-colon added in
    rev. 1.591
  
  
-------------- next part --------------
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.705 loncom/interface/lonprintout.pm:1.706
--- loncom/interface/lonprintout.pm:1.705	Tue Dec 10 04:52:30 2024
+++ loncom/interface/lonprintout.pm	Wed Jan 15 23:10:25 2025
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.705 2024/12/10 04:52:30 raeburn Exp $
+# $Id: lonprintout.pm,v 1.706 2025/01/15 23:10:25 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3886,7 +3886,6 @@
                                 $rendered = &print_latex_header().$rendered;
                             }
                         }
-;
                         if ($remove_latex_header eq 'YES') {
                             $rendered = &latex_header_footer_remove($rendered);
                         } else {
@@ -3901,7 +3900,7 @@
 
 
 			$answerenv{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
-			
+
 			&Apache::lonxml::restore_problem_counter();
 
 			my $ansrendered = &Apache::loncommon::get_student_answers($curresline,$username,$userdomain,$env{'request.course.id'},%answerenv);
@@ -4404,7 +4403,7 @@
     # Give that as a choice.
 
     if ($resourceTitle && $res_printable) {
-        push @{$printChoices}, ["<b><i>$resourceTitle</i></b> (".&mt('the resource you just saw on the screen').")", 'current_document', 'PAGESIZE'];
+        push(@{$printChoices}, ["<b><i>$resourceTitle</i></b> (".&mt('the resource you just saw on the screen').")", 'current_document', 'PAGESIZE']);
     }
 
     # Useful filter strings
@@ -4458,14 +4457,14 @@
 		my $resourcesymb   = $page_resources[0]->symb();
 		my ($pagemap, $pageid, $pageurl) = &Apache::lonnet::decode_symb($symb);
 		if ($page_ispage) {
-		    push @{$printChoices},
+		    push(@{$printChoices},
 		    [&mt('Selected [_1]Problems[_2] from page [_3]', '<b>', '</b>', '<b><i>'.$page_title.'</i></b>'),
 		     'map_problems_in_page',
-		     'CHOOSE_PROBLEMS_PAGE'];
-		    push @{$printChoices},
+		     'CHOOSE_PROBLEMS_PAGE']);
+		    push(@{$printChoices},
 		    [&mt('Selected [_1]Resources[_2] from page [_3]', '<b>', '</b>', '<b><i>'.$page_title.'</i></b>'),
 		     'map_resources_in_page',
-		     'CHOOSE_RESOURCES_PAGE'];
+		     'CHOOSE_RESOURCES_PAGE']);
 		}
         my $helperFragment = &generate_resource_chooser('CHOOSE_PROBLEMS_PAGE',
 							'Select Problem(s) to print',
@@ -4549,19 +4548,19 @@
             } else {
                 $optionText = &mt('Selected [_1]Problems[_2] from folder [_3]','<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>');
             }
-	    push @{$printChoices},
+	    push(@{$printChoices},
 	    [$optionText,
 	     'map_problems',
-	     'CHOOSE_PROBLEMS'];
+	     'CHOOSE_PROBLEMS']);
 	    # Allow all resources from sequence
             if ($helper->{VARS}->{'postdata'} eq '/adm/navmaps') {
                 $optionText = &mt('Selected [_1]Resources[_2] [_3]not in a folder[_4]','<b>','</b>','<i>','</i>');
             } else {
                 $optionText = &mt('Selected [_1]Resources[_2] from folder [_3]','<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>');
             }
-	    push @{$printChoices}, [$optionText,
+	    push(@{$printChoices}, [$optionText,
 				    'map_problems_pages',
-				    'CHOOSE_PROBLEMS_HTML'];
+				    'CHOOSE_PROBLEMS_HTML']);
 	    my $helperFragment = &generate_resource_chooser('CHOOSE_PROBLEMS',
 							    'Select Problem(s) to print',
 							    'multichoice="1" toponly="1" addstatus="1" closeallpages="1" modallink="1" nocurrloc="'.$nocurrloc.'"',
@@ -4605,9 +4604,9 @@
 
 	#  Selected problems/resources from entire course:
 
-        push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from [_3]entire course[_4]','<b>','</b>','<b>','</b>'), 'all_problems', 'ALL_PROBLEMS'];
-	push @{$printChoices}, [&mt('Selected [_1]Resources[_2] from [_3]entire course[_4]','<b>','</b>','<b>','</b>'), 'all_resources', 'ALL_RESOURCES'];
-	push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from [_3]entire course[_4] for [_5]selected people[_6]','<b>','</b>','<b>','</b>','<b>','</b>'), 'all_problems_students', 'ALL_PROBLEMS_STUDENTS'];
+        push(@{$printChoices}, [&mt('Selected [_1]Problems[_2] from [_3]entire course[_4]','<b>','</b>','<b>','</b>'), 'all_problems', 'ALL_PROBLEMS']);
+	push(@{$printChoices}, [&mt('Selected [_1]Resources[_2] from [_3]entire course[_4]','<b>','</b>','<b>','</b>'), 'all_resources', 'ALL_RESOURCES']);
+	push(@{$printChoices}, [&mt('Selected [_1]Problems[_2] from [_3]entire course[_4] for [_5]selected people[_6]','<b>','</b>','<b>','</b>','<b>','</b>'), 'all_problems_students', 'ALL_PROBLEMS_STUDENTS']);
 my $suffixXml = <<ALL_PROBLEMS;
   <state name="STUDENTS1" title="Select People">
       <message><b>Select sorting order of printout</b> </message>
@@ -4654,19 +4653,19 @@
 	    # either for selected students or for coded assignments.
 
 	    if ($page_ispage) {
-		push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from page [_3] for [_4]selected people[_5]',
+		push(@{$printChoices}, [&mt('Selected [_1]Problems[_2] from page [_3] for [_4]selected people[_5]',
 					    '<b>', '</b>', '<b><i>'.$page_title.'</i></b>', '<b>', '</b>'),
-					'problems_for_students_from_page', 'CHOOSE_TGT_STUDENTS_PAGE'];
-		push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from page [_3] for [_4]CODEd assignments[_5]',
+					'problems_for_students_from_page', 'CHOOSE_TGT_STUDENTS_PAGE']);
+		push(@{$printChoices}, [&mt('Selected [_1]Problems[_2] from page [_3] for [_4]CODEd assignments[_5]',
 					    '<b>', '</b>', '<b><i>'.$page_title.'</i></b>', '<b>', '</b>'),
-					'problems_for_anon_page', 'CHOOSE_ANON1_PAGE'];
+					'problems_for_anon_page', 'CHOOSE_ANON1_PAGE']);
 	    }
-	    push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from folder [_3] for [_4]selected people[_5]',
+	    push(@{$printChoices}, [&mt('Selected [_1]Problems[_2] from folder [_3] for [_4]selected people[_5]',
 					'<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>','<b>','</b>'),
-				    'problems_for_students', 'CHOOSE_STUDENTS'];
-	    push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from folder [_3] for [_4]CODEd assignments[_5]',
+				    'problems_for_students', 'CHOOSE_STUDENTS']);
+	    push(@{$printChoices}, [&mt('Selected [_1]Problems[_2] from folder [_3] for [_4]CODEd assignments[_5]',
 					'<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>','<b>','</b>'),
-				    'problems_for_anon', 'CHOOSE_ANON1'];
+				    'problems_for_anon', 'CHOOSE_ANON1']);
 	}
 
         my ($randomly_ordered_warning,$codechoice,$code_selection,$namechoice) =
@@ -4676,8 +4675,8 @@
 
 	    # Assignment printing:
 
-	    push @{$printChoices}, [&mt('Selected [_1]Resources[_2] from folder [_3] for [_4]selected people[_5]','<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>','<b>','</b>'), 'resources_for_students', 'CHOOSE_STUDENTS1'];
-	    push @{$printChoices}, [&mt('Selected [_1]Resources[_2] from folder [_3] for [_4]CODEd assignments[_5]','<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>','<b>','</b>'), 'resources_for_anon', 'CHOOSE_ANON2'];
+	    push(@{$printChoices}, [&mt('Selected [_1]Resources[_2] from folder [_3] for [_4]selected people[_5]','<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>','<b>','</b>'), 'resources_for_students', 'CHOOSE_STUDENTS1']);
+	    push(@{$printChoices}, [&mt('Selected [_1]Resources[_2] from folder [_3] for [_4]CODEd assignments[_5]','<b>','</b>','<b><i>'.$sequenceTitle.'</i></b>','<b>','</b>'), 'resources_for_anon', 'CHOOSE_ANON2']);
 	}
 
         # resource_selector will hold a few states that:
@@ -4798,7 +4797,7 @@
 	&& $helper->{VARS}->{'assignment'} eq ""
 	) {
 	my $pretty_dir = &Apache::lonnet::hreflocation($subdir);
-        push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from current subdirectory [_3]','<b>','</b>','<b><i>'.$pretty_dir.'</i></b>','<b>','</b>'), 'problems_from_directory', 'CHOOSE_FROM_SUBDIR'];
+        push(@{$printChoices}, [&mt('Selected [_1]Problems[_2] from current subdirectory [_3]','<b>','</b>','<b><i>'.$pretty_dir.'</i></b>','<b>','</b>'), 'problems_from_directory', 'CHOOSE_FROM_SUBDIR']);
         my $xmlfrag = <<CHOOSE_FROM_SUBDIR;
   <state name="CHOOSE_FROM_SUBDIR" title="Select File(s) from <b><small>$pretty_dir</small></b> to print">
 


More information about the LON-CAPA-cvs mailing list