[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Thu, 15 May 2003 14:55:24 -0000
sakharuk Thu May 15 10:55:24 2003 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Random seed now is the same for all problems printed from any subdirectory in the construction space. Random seed is printed on the document at the very beginning.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.174 loncom/interface/lonprintout.pm:1.175
--- loncom/interface/lonprintout.pm:1.174 Thu May 15 10:16:47 2003
+++ loncom/interface/lonprintout.pm Thu May 15 10:55:24 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.174 2003/05/15 14:16:47 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.175 2003/05/15 14:55:24 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1513,13 +1513,15 @@
$selectionmade = 6;
my @list_of_files=split /\|\|\|/, $helper->{'VARS'}->{'FILES'};
@list_of_files=sort @list_of_files;
- my $flag_latex_header_remove = 'NO';
+ my $flag_latex_header_remove = 'NO';
+ my $rndseed=time;
for (my $i=0;$i<=$#list_of_files;$i++) {
my $urlp = $list_of_files[$i];
if ($urlp=~/\//) {
my %form;
$form{'grade_target'}='tex';
$form{'textwidth'}=$LaTeXwidth;
+ $form{'rndseed'}=$rndseed;
if ($urlp =~ m|/home/([^/]+)/public_html|) {
$urlp =~ s|/home/([^/]*)/public_html|/~$1|;
} else {
@@ -1527,8 +1529,6 @@
}
my $texversion=&Apache::lonnet::ssi($urlp,%form);
if($helper->{'VARS'}->{'ANSWER_TYPE'} eq 'no') {
- my $rndseed=time;
- $form{'rndseed'}=$rndseed;
my %form;
$form{'grade_target'}='answer';
$form{'answer_output_mode'}='tex';
@@ -1565,6 +1565,7 @@
}
$flag_latex_header_remove = 'YES';
}
+ if ($helper->{VARS}->{'construction'} eq '1') {$result=~s/(\\typeout)/ RANDOM SEED IS $rndseed $1/;}
$result .= '\end{document}';
}
#-------------------------------------------------------- corrections for the different page formats