[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Mon, 14 Jul 2003 14:30:35 -0000
sakharuk Mon Jul 14 10:30:35 2003 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Added switch - batchmode on/batchmode off, available only for advanced users.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.202 loncom/interface/lonprintout.pm:1.203
--- loncom/interface/lonprintout.pm:1.202 Thu Jul 10 16:39:08 2003
+++ loncom/interface/lonprintout.pm Mon Jul 14 10:30:35 2003
@@ -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.203 2003/07/14 14:30:35 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -627,7 +627,8 @@
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 @@
$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 @@
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 @@
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/;
@@ -1158,6 +1162,24 @@
['Print with answers', 'no'] ];
Apache::lonhelper::choices->new();
}
+ if ($ENV{'request.role.adv'}) {
+ $paramHash = Apache::lonhelper::getParamHash();
+ $paramHash->{MESSAGE_TEXT} = "<br /><big><b><i>Another option available only for advanced users:</i></b></big><br />";
+ 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");