[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonprintout.pm
raeburn
raeburn at source.lon-capa.org
Wed Jul 3 08:59:50 EDT 2024
raeburn Wed Jul 3 12:59:50 2024 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface lonprintout.pm
Log:
- For 2.11
Backport 1.636, 1.676, 1,677, 1.678 (part)
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.627.2.35 loncom/interface/lonprintout.pm:1.627.2.36
--- loncom/interface/lonprintout.pm:1.627.2.35 Tue Jul 2 05:39:32 2024
+++ loncom/interface/lonprintout.pm Wed Jul 3 12:59:50 2024
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.627.2.35 2024/07/02 05:39:32 raeburn Exp $
+# $Id: lonprintout.pm,v 1.627.2.36 2024/07/03 12:59:50 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1344,8 +1344,8 @@
# necessity is determined by the problem_split param.
#
sub encapsulate_minipage {
- my ($text) = @_;
- if (!($env{'form.problem.split'} =~ /yes/i)) {
+ my ($text,$problem_split) = @_;
+ if (!($problem_split =~ /yes/i)) {
$text = '\begin{minipage}{\textwidth}'.$text.'\end{minipage}';
}
return $text;
@@ -2553,7 +2553,7 @@
my $body ='\vskip 0 mm \noindent\textbf{'.$title.'}\vskip 0 mm ';
$body.=&path_to_problem($urlp,$LaTeXwidth);
$body.='\vskip 1 mm '.$answer.'\end{document}';
- $body = &encapsulate_minipage($body);
+ $body = &encapsulate_minipage($body,$answerform{'problem_split'});
$texversion.=$body;
}
}
@@ -3017,7 +3017,7 @@
my $body ='\vskip 0 mm \noindent\textbf{'.$title.'}\vskip 0 mm ';
$body .= &path_to_problem ($urlp,$LaTeXwidth);
$body .='\vskip 1 mm '.$answer;
- $body = &encapsulate_minipage($body);
+ $body = &encapsulate_minipage($body,$answerform{'problem_split'});
$texversion .= $body;
} else {
$texversion='';
@@ -3247,7 +3247,7 @@
my @lines = &Apache::lonnet::get_scantronformat_file();
my ($code_type,$code_length,$bubbles_per_row)=('letter',6,10);
foreach my $line (@lines) {
- chomp($line);
+ next if (($line =~ /^\#/) || ($line eq ''));
my ($name,$type,$length,$bubbles_per_item) =
(split(/:/,$line))[0,2,4,17];
if ($name eq $code_option) {
@@ -3736,7 +3736,7 @@
my $body ='\vskip 0 mm \noindent\textbf{'.$title.'}\vskip 0 mm ';
$body .=&path_to_problem($res_url,$LaTeXwidth);
$body .='\vskip 1 mm '.$ansrendered;
- $body = &encapsulate_minipage($body);
+ $body = &encapsulate_minipage($body,$answerenv{'problem_split'});
$rendered = $header.$body;
}
}
@@ -3826,7 +3826,7 @@
$message = &mt('No incomplete resources');
}
if ($message) {
- $current_output = &encapsulate_minipage("\\vskip -10mm \n$message\n \\vskip 100 mm { }\n");
+ $current_output = &encapsulate_minipage("\\vskip -10mm \n$message\n \\vskip 100 mm { }\n",$moreenv->{'problem_split'});
}
if ($remove_latex_header eq "NO") {
$current_output = &print_latex_header() . $current_output;
@@ -4529,6 +4529,7 @@
my @lines = &Apache::lonnet::get_scantronformat_file();
my $codechoice='';
foreach my $line (@lines) {
+ next if (($line =~ /^\#/) || ($line eq ''));
my ($name,$description,$code_type,$code_length)=
(split(/:/,$line))[0,1,2,4];
if ($code_length > 0 &&
More information about the LON-CAPA-cvs
mailing list