--- loncom/interface/lonprintout.pm 2024/12/10 04:52:30 1.705
+++ loncom/interface/lonprintout.pm 2025/01/15 23:10:25 1.706
@@ -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 @@ sub print_resources {
$rendered = &print_latex_header().$rendered;
}
}
-;
if ($remove_latex_header eq 'YES') {
$rendered = &latex_header_footer_remove($rendered);
} else {
@@ -3901,7 +3900,7 @@ sub print_resources {
$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 @@ sub printHelper {
# Give that as a choice.
if ($resourceTitle && $res_printable) {
- push @{$printChoices}, ["$resourceTitle (".&mt('the resource you just saw on the screen').")", 'current_document', 'PAGESIZE'];
+ push(@{$printChoices}, ["$resourceTitle (".&mt('the resource you just saw on the screen').")", 'current_document', 'PAGESIZE']);
}
# Useful filter strings
@@ -4458,14 +4457,14 @@ sub printHelper {
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]', '', '', ''.$page_title.''),
'map_problems_in_page',
- 'CHOOSE_PROBLEMS_PAGE'];
- push @{$printChoices},
+ 'CHOOSE_PROBLEMS_PAGE']);
+ push(@{$printChoices},
[&mt('Selected [_1]Resources[_2] from page [_3]', '', '', ''.$page_title.''),
'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 @@ sub printHelper {
} else {
$optionText = &mt('Selected [_1]Problems[_2] from folder [_3]','','',''.$sequenceTitle.'');
}
- 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]','','','','');
} else {
$optionText = &mt('Selected [_1]Resources[_2] from folder [_3]','','',''.$sequenceTitle.'');
}
- 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 @@ sub printHelper {
# Selected problems/resources from entire course:
- push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from [_3]entire course[_4]','','','',''), 'all_problems', 'ALL_PROBLEMS'];
- push @{$printChoices}, [&mt('Selected [_1]Resources[_2] from [_3]entire course[_4]','','','',''), 'all_resources', 'ALL_RESOURCES'];
- push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from [_3]entire course[_4] for [_5]selected people[_6]','','','','','',''), 'all_problems_students', 'ALL_PROBLEMS_STUDENTS'];
+ push(@{$printChoices}, [&mt('Selected [_1]Problems[_2] from [_3]entire course[_4]','','','',''), 'all_problems', 'ALL_PROBLEMS']);
+ push(@{$printChoices}, [&mt('Selected [_1]Resources[_2] from [_3]entire course[_4]','','','',''), 'all_resources', 'ALL_RESOURCES']);
+ push(@{$printChoices}, [&mt('Selected [_1]Problems[_2] from [_3]entire course[_4] for [_5]selected people[_6]','','','','','',''), 'all_problems_students', 'ALL_PROBLEMS_STUDENTS']);
my $suffixXml = <
Select sorting order of printout
@@ -4654,19 +4653,19 @@ ALL_PROBLEMS
# 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]',
'', '', ''.$page_title.'', '', ''),
- '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]',
'', '', ''.$page_title.'', '', ''),
- '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]',
'','',''.$sequenceTitle.'','',''),
- '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]',
'','',''.$sequenceTitle.'','',''),
- 'problems_for_anon', 'CHOOSE_ANON1'];
+ 'problems_for_anon', 'CHOOSE_ANON1']);
}
my ($randomly_ordered_warning,$codechoice,$code_selection,$namechoice) =
@@ -4676,8 +4675,8 @@ ALL_PROBLEMS
# Assignment printing:
- push @{$printChoices}, [&mt('Selected [_1]Resources[_2] from folder [_3] for [_4]selected people[_5]','','',''.$sequenceTitle.'','',''), 'resources_for_students', 'CHOOSE_STUDENTS1'];
- push @{$printChoices}, [&mt('Selected [_1]Resources[_2] from folder [_3] for [_4]CODEd assignments[_5]','','',''.$sequenceTitle.'','',''), 'resources_for_anon', 'CHOOSE_ANON2'];
+ push(@{$printChoices}, [&mt('Selected [_1]Resources[_2] from folder [_3] for [_4]selected people[_5]','','',''.$sequenceTitle.'','',''), 'resources_for_students', 'CHOOSE_STUDENTS1']);
+ push(@{$printChoices}, [&mt('Selected [_1]Resources[_2] from folder [_3] for [_4]CODEd assignments[_5]','','',''.$sequenceTitle.'','',''), 'resources_for_anon', 'CHOOSE_ANON2']);
}
# resource_selector will hold a few states that:
@@ -4798,7 +4797,7 @@ CHOOSE_ANON2
&& $helper->{VARS}->{'assignment'} eq ""
) {
my $pretty_dir = &Apache::lonnet::hreflocation($subdir);
- push @{$printChoices}, [&mt('Selected [_1]Problems[_2] from current subdirectory [_3]','','',''.$pretty_dir.'','',''), 'problems_from_directory', 'CHOOSE_FROM_SUBDIR'];
+ push(@{$printChoices}, [&mt('Selected [_1]Problems[_2] from current subdirectory [_3]','','',''.$pretty_dir.'','',''), 'problems_from_directory', 'CHOOSE_FROM_SUBDIR']);
my $xmlfrag = <