[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Mon, 13 Mar 2006 17:29:50 -0000


raeburn		Mon Mar 13 12:29:50 2006 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  Retrieval of randompick parameter and parts array was incorrect in a couple of helper functions.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.367 loncom/interface/lonnavmaps.pm:1.368
--- loncom/interface/lonnavmaps.pm:1.367	Sat Mar  4 01:12:40 2006
+++ loncom/interface/lonnavmaps.pm	Mon Mar 13 12:29:50 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.367 2006/03/04 06:12:40 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.368 2006/03/13 17:29:50 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3657,8 +3657,7 @@
 sub randomout { my $self=shift; return $self->navHash("randomout_", 1); }
 sub randompick { 
     my $self = shift;
-    return $self->{NAV_MAP}->{PARM_HASH}->{$self->symb .
-                                               '.0.parameter_randompick'};
+    return $self->{NAV_MAP}->{PARM_HASH}->{$self->symb().'.0.randompick'};
 }
 sub link {
     my $self=shift;
@@ -4258,7 +4257,7 @@
 sub responseTypes {
     my $self = shift;
     my %responses;
-    foreach my $part ($self->parts()) {
+    foreach my $part (@{$self->parts()}) {
         foreach my $responsetype ($self->responseType($part)) {
             $responses{$responsetype}++ if (defined($responsetype));
         }