--- loncom/interface/lonprintout.pm 2023/01/17 18:09:25 1.627.2.32.2.3
+++ loncom/interface/lonprintout.pm 2024/10/16 18:47:18 1.627.2.37
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.627.2.32.2.3 2023/01/17 18:09:25 raeburn Exp $
+# $Id: lonprintout.pm,v 1.627.2.37 2024/10/16 18:47:18 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1345,7 +1345,7 @@ sub latex_header_footer_remove {
#
sub encapsulate_minipage {
my ($text,$problem_split) = @_;
- if (!($problem.split =~ /yes/i)) {
+ if (!($problem_split =~ /yes/i)) {
$text = '\begin{minipage}{\textwidth}'.$text.'\end{minipage}';
}
return $text;
@@ -1733,11 +1733,11 @@ my %page_formats=
('letter' => {
'book' => {
'1' => [ '7.1 in','9.8 in', '-0.57 in','-0.57 in','0.275 in'],
- '2' => ['3.66 in','9.8 in', '-0.57 in','-0.57 in','0.275 in']
+ '2' => ['3.66 in','9.8 in', '-0.57 in','-0.57 in','-0.4 in']
},
'album' => {
'1' => [ '8.8 in', '6.8 in','-0.55 in', '-0.55 in','0.394 in'],
- '2' => [ '4.8 in', '6.8 in','-0.5 in', '-1.0 in','3.5 in']
+ '2' => [ '4.8 in', '6.8 in','-0.5 in', '-1.0 in','3.25 in']
},
},
'legal' => {
@@ -3170,8 +3170,12 @@ ENDPART
my $map;
if ($helper->{VARS}->{'symb'}) {
- ($map, my $id, my $resource) =
- &Apache::lonnet::decode_symb($helper->{VARS}->{'symb'});
+ unless ((($print_type eq 'all_problems_students') ||
+ ($print_type eq 'incomplete_problems_selpeople_course')) &&
+ $perm{'pfo'}) {
+ ($map, my $id, my $resource) =
+ &Apache::lonnet::decode_symb($helper->{VARS}->{'symb'});
+ }
}
#loop over students
@@ -3765,7 +3769,7 @@ sub print_resources {
$rendered =~ s/\\end\{document}//;
}
$current_output .= $rendered.'\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}\strut \vskip 0 mm \strut ';
- } elsif($res_url = ~/\.pdf$/) {
+ } elsif($res_url =~ /\.pdf$/) {
my $url = &Apache::lonnet::clutter($res_url);
my $rendered = &include_pdf($url);
if ($remove_latex_header ne 'NO') {
@@ -4072,12 +4076,18 @@ sub printHelper {
$helper->{VARS}->{'symb'} = $env{'form.symb'};
}
if ($env{'form.url'}) {
- unless ($env{'form.url'} eq '/adm/navmaps') {
- $helper->{VARS}->{'symb'} = &Apache::lonnet::symbread($helper->{VARS}->{'postdata'});
- }
+ $helper->{VARS}->{'symb'} = &Apache::lonnet::symbread($helper->{VARS}->{'postdata'});
}
+
}
+ if ($env{'form.symb'}) {
+ $helper->{VARS}->{'symb'} = $env{'form.symb'};
+ }
+ if ($env{'form.url'}) {
+ $helper->{VARS}->{'symb'} = &Apache::lonnet::symbread($helper->{VARS}->{'postdata'});
+
+ }
if ($helper->{VARS}->{'symb'} ne '') {
$helper->{VARS}->{'symb'}=
&Apache::lonenc::check_encrypt($helper->{VARS}->{'symb'});
@@ -4255,7 +4265,7 @@ sub printHelper {
$helperFragment .= &generate_resource_chooser('CHOOSE_RESOURCES_PAGE',
'Select Resource(s) to print',
- 'multichoice="1" toponly="1" addstatus="1" closeallpages="1" modallink="1"',
+ 'multichoice="1" toponly="1" addstatus="1" closeallpages="1" modallink="1" suppressNavmap="1"',
'RESOURCES',
'PAGESIZE',
$url,
@@ -4302,7 +4312,7 @@ sub printHelper {
if ($userCanPrint || &printable($map_open, $map_close)) {
push(@{$printChoices},
- [&mt('Selected [_1]Incomplete Problems[_2] from folder [_3]' . $textSuffix,
+ [&mt('Selected [_1]Incomplete Problems[_2] from folder [_3]' . $textSuffix,
'', '',
''. $sequenceTitle . ''),
$printSelector,
@@ -4329,7 +4339,7 @@ sub printHelper {
$start_new_option);
$helperFragment .= &generate_resource_chooser('CHOOSE_PROBLEMS_HTML',
'Select Resource(s) to print',
- 'multichoice="1" toponly="1" addstatus="1" closeallpages="1" modallink="1"',
+ 'multichoice="1" toponly="1" addstatus="1" closeallpages="1" modallink="1" suppressNavmap="1"',
'RESOURCES',
'PAGESIZE',
$map,
@@ -4352,8 +4362,7 @@ sub printHelper {
# BZ 5209 - incomplete problems from entire course:
push(@{$printChoices},
- [&mt('Selected [_1]Incomplete Problems[_2] from [_3]entire course[_4] for [_5]selected people[_6]',
- '','','','','',''),
+ [&mtn('Selected Incomplete Problems from entire course for selected people'),
'incomplete_problems_selpeople_course', 'INCOMPLETE_PROBLEMS_COURSE_RESOURCES']);
my $helperFragment = &create_incomplete_course_helper($helper); # Create needed states.
@@ -4361,9 +4370,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}, [&mtn('Selected Problems from entire course'), 'all_problems', 'ALL_PROBLEMS'];
+ push @{$printChoices}, [&mtn('Selected Resources from entire course'), 'all_resources', 'ALL_RESOURCES'];
+ push @{$printChoices}, [&mtn('Selected Problems from entire course for selected people'), 'all_problems_students', 'ALL_PROBLEMS_STUDENTS'];
my $suffixXml = <
Select sorting order of printout
@@ -4387,7 +4396,7 @@ ALL_PROBLEMS
$start_new_option) .
&generate_resource_chooser('ALL_RESOURCES',
'Select Resource(s) to print',
- " toponly='0' multichoice='1' suppressEmptySequences='0' addstatus='1' closeallpages='1' modallink='1'",
+ 'toponly="0" multichoice="1" suppressEmptySequences="0" addstatus="1" closeallpages="1" modallink="1" suppressNavmap="1"',
'RESOURCES',
'PAGESIZE',
'',
@@ -4439,7 +4448,7 @@ ALL_PROBLEMS
#
my $resource_selector= &generate_resource_chooser('SELECT_PROBLEMS',
'Select resources to print',
- 'multichoice="1" addstatus="1" closeallpages="1" modallink="1"',
+ 'multichoice="1" addstatus="1" closeallpages="1" modallink="1" suppressNavmap="1"',
'RESOURCES',
'PRINT_FORMATTING',
$map,
@@ -4698,9 +4707,8 @@ CHOOSE_FROM_SUBDIR
# Allow the user to select any sequence in the course, feed it to
# another resource selector for that sequence
if (!$helper->{VARS}->{'construction'} && !$is_published) {
- push(@$printChoices, [&mt('Selected [_1]Resources[_2] from [_3]selected folder[_4] in course',
- '','','',''),
- 'select_sequences', 'CHOOSE_SEQUENCE']);
+ push @$printChoices, [&mtn("Selected Resources from selected folder in course"),
+ 'select_sequences', 'CHOOSE_SEQUENCE'];
my $escapedSequenceName = $helper->{VARS}->{'SEQUENCE'};
#Escape apostrophes and backslashes for Perl
$escapedSequenceName =~ s/\\/\\\\/g;