[LON-CAPA-cvs] cvs: loncom /homework response.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 08 Nov 2004 19:20:13 -0000
albertel Mon Nov 8 14:20:13 2004 EDT
Modified files:
/loncom/homework response.pm
Log:
- forward port 64bit rndseed changes
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.108 loncom/homework/response.pm:1.109
--- loncom/homework/response.pm:1.108 Thu Oct 21 02:33:37 2004
+++ loncom/homework/response.pm Mon Nov 8 14:20:13 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.108 2004/10/21 06:33:37 albertel Exp $
+# $Id: response.pm,v 1.109 2004/11/08 19:20:13 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -136,12 +136,17 @@
my ($num1,$num2)=split(/\Q$char\E/,$rndseed);
$num1+=$rndmod;
$num2+=$rndmod;
+ if($Apache::lonnet::_64bit) { $num1=(($num1<<32)>>32); $num2=(($num2<<32)>>32); }
$rndseed=$num1.$char.$num2;
} else {
$rndseed+=$rndmod;
+ if($Apache::lonnet::_64bit) {
+ use integer;
+ $rndseed=(($rndseed<<32)>>32);
+ }
}
- &Apache::lonnet::setup_random_from_rndseed($rndseed);
&Apache::lonxml::debug("randseed $rndseed");
+ &Apache::lonnet::setup_random_from_rndseed($rndseed);
return '';
}