[LON-CAPA-cvs] cvs: loncom /homework response.pm

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 24 Jun 2006 01:31:36 -0000


albertel		Fri Jun 23 21:31:36 2006 EDT

  Modified files:              
    /loncom/homework	response.pm 
  Log:
  - updating the random seed to look in the correct location for dimension and instance ids
  
  
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.140 loncom/homework/response.pm:1.141
--- loncom/homework/response.pm:1.140	Mon Jun 19 12:32:35 2006
+++ loncom/homework/response.pm	Fri Jun 23 21:31:34 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # various response type definitons response definition
 #
-# $Id: response.pm,v 1.140 2006/06/19 16:32:35 www Exp $
+# $Id: response.pm,v 1.141 2006/06/24 01:31:34 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -128,11 +128,11 @@
 	}
 	$shift_amt=scalar(@Apache::inputtags::responselist);
     } elsif ($Apache::lonhomework::parsing_a_task) {
-	$id1=$Apache::bridgetask::dimension;
-	if (!$ignore_id2 && defined($Apache::bridgetask::instance[-1])) {
-	    $id2=$Apache::bridgetask::instance[-1];
+	$id1=&Apache::bridgetask::get_dim_id();
+	if (!$ignore_id2 && ref($Apache::bridgetask::instance{$id1})) {
+	    $id2=$Apache::bridgetask::instance{$id1}[-1];
 	}
-	$shift_amt=scalar(@Apache::bridgetask::instance);
+	$shift_amt=scalar(@{$Apache::bridgetask::instance{$id1}});
     } 
     &Apache::lonxml::debug("id1: $id1, id2: $id2, shift_amt: $shift_amt");
     if (!$rand_alg || $rand_alg eq '32bit' || $rand_alg eq '64bit' ||