[LON-CAPA-cvs] cvs: loncom /homework imageresponse.pm matchresponse.pm rankresponse.pm structuretags.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 27 May 2004 04:32:20 -0000
albertel Thu May 27 00:32:20 2004 EDT
Modified files:
/loncom/homework imageresponse.pm matchresponse.pm rankresponse.pm
structuretags.pm
Log:
- converting to use push/poprandomnumber
Index: loncom/homework/imageresponse.pm
diff -u loncom/homework/imageresponse.pm:1.52 loncom/homework/imageresponse.pm:1.53
--- loncom/homework/imageresponse.pm:1.52 Mon Mar 15 17:09:52 2004
+++ loncom/homework/imageresponse.pm Thu May 27 00:32:19 2004
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# image click response style
#
-# $Id: imageresponse.pm,v 1.52 2004/03/15 22:09:52 albertel Exp $
+# $Id: imageresponse.pm,v 1.53 2004/05/27 04:32:19 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -75,7 +75,7 @@
sub start_foilgroup {
%Apache::response::foilgroup=();
$Apache::imageresponse::conceptgroup=0;
- &Apache::response::setrandomnumber();
+ &Apache::response::pushrandomnumber();
return '';
}
@@ -296,6 +296,7 @@
} elsif ($target eq 'edit') {
$result=&Apache::edit::end_table();
}
+ &Apache::response::poprandomnumber();
return $result;
}
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.40 loncom/homework/matchresponse.pm:1.41
--- loncom/homework/matchresponse.pm:1.40 Thu Apr 8 10:22:48 2004
+++ loncom/homework/matchresponse.pm Thu May 27 00:32:19 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Full matching style response
#
-# $Id: matchresponse.pm,v 1.40 2004/04/08 14:22:48 sakharuk Exp $
+# $Id: matchresponse.pm,v 1.41 2004/05/27 04:32:19 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -232,7 +232,7 @@
my $result;
%Apache::response::foilgroup=();
$Apache::matchresponse::conceptgroup=0;
- &Apache::response::setrandomnumber();
+ &Apache::response::pushrandomnumber();
if ($target eq 'edit') {
$result.=&Apache::edit::start_table($token)
."<tr><td>Collection Of Foils</td><td>Delete:"
@@ -266,6 +266,7 @@
} elsif ($target eq 'edit') {
$result=&Apache::edit::end_table();
}
+ &Apache::response::poprandomnumber();
return $result;
}
Index: loncom/homework/rankresponse.pm
diff -u loncom/homework/rankresponse.pm:1.33 loncom/homework/rankresponse.pm:1.34
--- loncom/homework/rankresponse.pm:1.33 Wed Apr 7 15:31:06 2004
+++ loncom/homework/rankresponse.pm Thu May 27 00:32:19 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# rank style response
#
-# $Id: rankresponse.pm,v 1.33 2004/04/07 19:31:06 sakharuk Exp $
+# $Id: rankresponse.pm,v 1.34 2004/05/27 04:32:19 albertel Exp $
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -89,7 +89,7 @@
my $result;
%Apache::response::foilgroup=();
$Apache::rankresponse::conceptgroup=0;
- &Apache::response::setrandomnumber();
+ &Apache::response::pushrandomnumber();
return $result;
}
@@ -118,6 +118,7 @@
} elsif ($target eq 'edit') {
$result=&Apache::edit::end_table();
}
+ &Apache::response::poprandomnumber();
return $result;
}
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.250 loncom/homework/structuretags.pm:1.251
--- loncom/homework/structuretags.pm:1.250 Thu May 27 00:25:13 2004
+++ loncom/homework/structuretags.pm Thu May 27 00:32:19 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.250 2004/05/27 04:25:13 albertel Exp $
+# $Id: structuretags.pm,v 1.251 2004/05/27 04:32:19 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -983,12 +983,13 @@
my $a=shift;
my $i;
if (defined(@$a)) {
- &Apache::response::setrandomnumber();
+ &Apache::response::pushrandomnumber();
for($i=@$a;--$i;) {
my $j=int(&Math::Random::random_uniform() * ($i+1));
next if $i == $j;
@$a[$i,$j] = @$a[$j,$i];
}
+ &Apache::response::poprandomnumber();
}
}