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

sakharuk lon-capa-cvs@mail.lon-capa.org
Wed, 02 Apr 2003 18:40:37 -0000


sakharuk		Wed Apr  2 13:40:37 2003 EDT

  Modified files:              
    /loncom/homework	optionresponse.pm 
  Log:
   Corrected radioresponse inside of webbubbles function.
  
  
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.72 loncom/homework/optionresponse.pm:1.73
--- loncom/homework/optionresponse.pm:1.72	Wed Apr  2 13:07:10 2003
+++ loncom/homework/optionresponse.pm	Wed Apr  2 13:40:37 2003
@@ -1,7 +1,7 @@
 # LearningOnline Network with CAPA
 # option list style responses
 #
-# $Id: optionresponse.pm,v 1.72 2003/04/02 18:07:10 sakharuk Exp $
+# $Id: optionresponse.pm,v 1.73 2003/04/02 18:40:37 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -393,7 +393,7 @@
 	  }
 	  $result.=$break.$text."\n";
 	  if ($Apache::lonhomework::type eq 'exam') {
-	    $result.=&webbubbles(\@opt,\@alphabet);
+	    $result.=&webbubbles(\@opt,\@alphabet,$temp);
 	  }
 	  $temp++;
       } else {
@@ -468,14 +468,14 @@
 
 sub webbubbles {
 
-    my ($ropt,$ralphabet)=@_;
+    my ($ropt,$ralphabet,$temp)=@_;
     my @opt=@$ropt; 
     my @alphabet=@$ralphabet;
     my $result='';
 	my $number_of_bubbles = $#opt + 1;
 	$result.= '<table border="1"><tr>';
 	for (my $ind=0;$ind<$number_of_bubbles;$ind++) {
-	   $result.='<td><input type="radio" name="HWVAL'.$Apache::inputtags::response['-1'].
+	   $result.='<td><input type="radio" name="HWVAL_'.$Apache::inputtags::response['-1'].':'.$temp.
                     '" value='.$opt[$ind].'>'.$alphabet[$ind].': '.$opt[$ind].'</td>';
 	}
 	$result.='</tr></table>';