version 1.702, 2024/11/10 20:41:18
|
version 1.703, 2024/11/11 00:43:39
|
Line 1985 sub get_course {
|
Line 1985 sub get_course {
|
} |
} |
|
|
sub page_format_transformation { |
sub page_format_transformation { |
my ($papersize,$layout,$numberofcolumns,$choice,$text,$assignment,$tableofcontents,$indexlist,$selectionmade) = @_; |
my ($papersize,$layout,$numberofcolumns,$choice,$text,$assignment,$tableofcontents, |
|
$indexlist,$selectionmade,$mostrecent) = @_; |
my ($textwidth,$textheight,$oddoffset,$evenoffset,$topmargin); |
my ($textwidth,$textheight,$oddoffset,$evenoffset,$topmargin); |
|
|
if ($selectionmade eq '4') { |
if ($selectionmade eq '4') { |
Line 1999 sub page_format_transformation {
|
Line 2000 sub page_format_transformation {
|
} |
} |
($textwidth,$textheight,$oddoffset,$evenoffset,$topmargin) = &page_format($papersize,$layout,$numberofcolumns,$topmargin); |
($textwidth,$textheight,$oddoffset,$evenoffset,$topmargin) = &page_format($papersize,$layout,$numberofcolumns,$topmargin); |
|
|
|
my $name; |
my $name = &get_name(); |
if ($mostrecent ne '') { |
|
$name = $mostrecent; |
|
} else { |
|
$name = &get_name(); |
|
} |
my $courseidinfo = &get_course(); |
my $courseidinfo = &get_course(); |
my $header_text = $parmhash{'print_header_format'}; |
my $header_text = $parmhash{'print_header_format'}; |
$header_text = &format_page_header($textwidth, $header_text, $assignment, |
$header_text = &format_page_header($textwidth, $header_text, $assignment, |
Line 2768 sub print_construction_sequence {
|
Line 2773 sub print_construction_sequence {
|
# 6 Print selected problems from a folder. |
# 6 Print selected problems from a folder. |
# 7 Print print selected resources from some scope. |
# 7 Print print selected resources from some scope. |
# 8 Print resources for selected students. |
# 8 Print resources for selected students. |
|
# 9 Print for anonymous CODEs |
# |
# |
#BZ 5209 |
#BZ 5209 |
# 2 map_incomplete_problems_seq Print incomplete problems from the current |
# 2 map_incomplete_problems_seq Print incomplete problems from the current |
Line 2860 ENDPART
|
Line 2866 ENDPART
|
my $LaTeXwidth=&recalcto_mm($textwidth); |
my $LaTeXwidth=&recalcto_mm($textwidth); |
my @print_array=(); |
my @print_array=(); |
my @student_names=(); |
my @student_names=(); |
|
my $lastprinted; |
|
|
# Common settings for the %form hash: |
# Common settings for the %form hash: |
# In some cases these settings get overridden by specific cases, but the |
# In some cases these settings get overridden by specific cases, but the |
Line 3388 ENDPART
|
Line 3394 ENDPART
|
# &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,&mt('last student').' '.$fullname); |
# &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,&mt('last student').' '.$fullname); |
&Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,'last student'); |
&Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,'last student'); |
$flag_latex_header_remove = 'YES'; |
$flag_latex_header_remove = 'YES'; |
|
if ($printed) { |
|
$lastprinted = $fullname; |
|
} |
if (&Apache::loncommon::connection_aborted($r)) { last; } |
if (&Apache::loncommon::connection_aborted($r)) { last; } |
} |
} |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
Line 3397 ENDPART
|
Line 3406 ENDPART
|
($print_type eq 'resources_for_anon') || |
($print_type eq 'resources_for_anon') || |
($print_type eq 'select_sequences_problems_for_anon') || |
($print_type eq 'select_sequences_problems_for_anon') || |
($print_type eq 'select_sequences_resources_for_anon')) { |
($print_type eq 'select_sequences_resources_for_anon')) { |
|
$selectionmade = 9; |
my $cdom =$env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cdom =$env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cnum =$env{'course.'.$env{'request.course.id'}.'.num'}; |
my $cnum =$env{'course.'.$env{'request.course.id'}.'.num'}; |
my $num_todo=$helper->{'VARS'}->{'NUMBER_TO_PRINT_TOTAL'}; |
my $num_todo=$helper->{'VARS'}->{'NUMBER_TO_PRINT_TOTAL'}; |
Line 3510 ENDPART
|
Line 3520 ENDPART
|
&mt('last assignment').' '.$fullname); |
&mt('last assignment').' '.$fullname); |
$flag_latex_header_remove = 'YES'; |
$flag_latex_header_remove = 'YES'; |
$count++; |
$count++; |
|
if ($printed) { |
|
$lastprinted = $fullname; |
|
} |
if (&Apache::loncommon::connection_aborted($r)) { last; } |
if (&Apache::loncommon::connection_aborted($r)) { last; } |
} |
} |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
Line 3589 ENDPART
|
Line 3602 ENDPART
|
# Only post process if that has not been turned off e.g. by a raw latex resource. |
# Only post process if that has not been turned off e.g. by a raw latex resource. |
|
|
if ($do_postprocessing) { |
if ($do_postprocessing) { |
|
my $mostrecent; |
|
if ((($selectionmade == 5) || ($selectionmade == 8) || ($selectionmade == 9)) && |
|
(($numberofcolumns == 1) || ($laystyle eq 'album' && $papersize eq 'a4'))) { |
|
$mostrecent = $lastprinted; |
|
} |
$result = &page_format_transformation($papersize, |
$result = &page_format_transformation($papersize, |
$laystyle,$numberofcolumns, |
$laystyle,$numberofcolumns, |
$print_type,$result, |
$print_type,$result, |
$helper->{VARS}->{'assignment'}, |
$helper->{VARS}->{'assignment'}, |
$helper->{'VARS'}->{'TABLE_CONTENTS'}, |
$helper->{'VARS'}->{'TABLE_CONTENTS'}, |
$helper->{'VARS'}->{'TABLE_INDEX'}, |
$helper->{'VARS'}->{'TABLE_INDEX'}, |
$selectionmade); |
$selectionmade,$mostrecent); |
$result = &latex_corrections($number_of_columns,$result,$selectionmade, |
$result = &latex_corrections($number_of_columns,$result,$selectionmade, |
$helper->{'VARS'}->{'ANSWER_TYPE'}); |
$helper->{'VARS'}->{'ANSWER_TYPE'}); |
#if ($numberofcolumns == 1) { |
#if ($numberofcolumns == 1) { |