[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 04 May 2004 19:58:57 -0000
albertel Tue May 4 15:58:57 2004 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
- seems more effcient this way
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.298 loncom/interface/lonprintout.pm:1.299
--- loncom/interface/lonprintout.pm:1.298 Mon May 3 13:51:11 2004
+++ loncom/interface/lonprintout.pm Tue May 4 15:58:57 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.298 2004/05/03 17:51:11 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.299 2004/05/04 19:58:57 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1046,6 +1046,7 @@
@allcodes=split(',',$result{$old_name});
} else {
my %allcodes;
+ srand($seed);
for (my $i=0;$i<$num_todo;$i++) {
$moreenv{'CODE'}=&get_CODE(\%allcodes,$i,$seed,'6');
}
@@ -1247,7 +1248,6 @@
sub get_CODE {
my ($all_codes,$num,$seed,$size)=@_;
my $max='1'.'0'x$size;
- srand($seed);
my $newcode;
while(1) {
$newcode=sprintf("%06d",int(rand($max)));