--- loncom/interface/lonprintout.pm 2003/07/10 20:39:08 1.202
+++ loncom/interface/lonprintout.pm 2003/07/28 13:46:42 1.205
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.202 2003/07/10 20:39:08 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.205 2003/07/28 13:46:42 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -627,7 +627,8 @@ ENDPART
my %form;
$form{'grade_target'}='tex';
$form{'textwidth'}=$LaTeXwidth;
- $form{'problem_split'}=$parmhash{'problem_stream_switch'};
+ $form{'problem_split'}=$parmhash{'problem_stream_switch'};
+ $form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
my $rndseed=time;
$form{'rndseed'}=$rndseed;
&Apache::lonnet::appenv(%moreenv);
@@ -665,6 +666,7 @@ ENDPART
$form{'grade_target'}='tex';
$form{'textwidth'}=$LaTeXwidth;
$form{'problem_split'}=$parmhash{'problem_stream_switch'};
+ $form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
my $flag_latex_header_remove = 'NO';
my $flag_page_in_sequence = 'NO';
my @master_seq=split /\|\|\|/, $helper->{'VARS'}->{'RESOURCES'};
@@ -756,6 +758,7 @@ ENDPART
if($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') {
my %form;
$form{'answer_output_mode'}='tex';
+ $form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
my $ansrendered = &Apache::loncommon::get_student_answers($curresline,$username,$userdomain,$ENV{'request.course.id'},%form);
$rendered=~s/(\\keephidden{ENDOFPROBLEM})/$ansrendered$1/;
}
@@ -805,6 +808,7 @@ ENDPART
my %form;
$form{'grade_target'}='answer';
$form{'answer_output_mode'}='tex';
+ $form{'latex_type'}=$helper->{'VARS'}->{'LATEX_TYPE'};
$form{'rndseed'}=$rndseed;
my $answer=&Apache::lonnet::ssi($urlp,%form);
$texversion=~s/(\\keephidden{ENDOFPROBLEM})/$answer$1/;
@@ -1103,9 +1107,10 @@ HELPERFRAGMENT
How should the results be printed?
- Start each student\'s assignment on a new page (add a pagefeed after each assignment)
- Add one empty page after each student\'s assignment
- Add two empty pages after each student\'s assignment
+ Start each student\'s assignment on a new page/column (add a pagefeed after each assignment)
+ Add one empty page/column after each student\'s assignment
+ Add two empty pages/column after each student\'s assignment
+ Add three empty pages/column after each student\'s assignment
CHOOSE_STUDENTS
@@ -1126,7 +1131,7 @@ CHOOSE_FROM_SUBDIR
$xmlfrag .= <<'CHOOSE_FROM_SUBDIR';
return $filename =~
- m/^[^\.]+\.(problem|exam|quiz|assess|survey|form|library)$/;
+ m/\.(problem|exam|quiz|assess|survey|form|library)$/;
@@ -1158,6 +1163,24 @@ CHOOSE_FROM_SUBDIR
['Print with answers', 'no'] ];
Apache::lonhelper::choices->new();
}
+ if ($ENV{'request.role.adv'}) {
+ $paramHash = Apache::lonhelper::getParamHash();
+ $paramHash->{MESSAGE_TEXT} = "
Another option available only for advanced users:
";
+ Apache::lonhelper::message->new();
+ $paramHash = Apache::lonhelper::getParamHash();
+ $paramHash->{'variable'} = 'LATEX_TYPE';
+ $helper->declareVar('LATEX_TYPE');
+ if ($helper->{VARS}->{'construction'} eq '1') {
+ $paramHash->{CHOICES} = [
+ ['Print in standard LaTeX mode', 'standard'],
+ ['Print in LaTeX batchmode', 'batchmode'], ];
+ } else {
+ $paramHash->{CHOICES} = [
+ ['Print in LaTeX batchmode', 'batchmode'],
+ ['Print in standard LaTeX mode', 'standard'] ];
+ }
+ Apache::lonhelper::choices->new();
+ }
Apache::lonprintout::page_format_state->new("FORMAT");