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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 05 Aug 2002 15:55:39 -0000


albertel		Mon Aug  5 11:55:39 2002 EDT

  Modified files:              
    /loncom/homework	optionresponse.pm 
  Log:
  - removed global, and renamed a variable
  
  
  
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.44 loncom/homework/optionresponse.pm:1.45
--- loncom/homework/optionresponse.pm:1.44	Mon Jul 29 16:43:47 2002
+++ loncom/homework/optionresponse.pm	Mon Aug  5 11:55:39 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # option list style responses
 #
-# $Id: optionresponse.pm,v 1.44 2002/07/29 20:43:47 albertel Exp $
+# $Id: optionresponse.pm,v 1.45 2002/08/05 15:55:39 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -273,7 +273,7 @@
   my @falselist;
   my $result;
   my $name;
-  $Apache::optionresponse::displayoptionintex=0;
+  my $displayoptionintex=0;
   my @whichopt = &whichfoils($max);
   my $part=$Apache::inputtags::part;
   my $id=$Apache::inputtags::response[-1];
@@ -305,17 +305,17 @@
 		  ."</select>\n".$Apache::response::foilgroup{$name.'.text'}."\n";
 	  $temp++;
       } else {
-	  if ($Apache::optionresponse::displayoptionintex == 0) {
-              my $durtyoptionlist = $optionlist;
-	      $durtyoptionlist =~ s/<option><\/option>/\\item \[\] The possible answers are:/;
-	      $durtyoptionlist =~ s/<option>/{\\bf /g;
-	      $durtyoptionlist =~ s/<\/option>/},/g;
-	      $durtyoptionlist =~ s/,$/\./g;
-	      $durtyoptionlist =~ s/>/\$>\$/g;
-	      $durtyoptionlist =~ s/</\$<\$/g;
-	      $durtyoptionlist =~ s/=/\$=\$/g;
-	      $result.= $durtyoptionlist.'\item '.$Apache::response::foilgroup{$name.'.text'};
-	      $Apache::optionresponse::displayoptionintex=1;
+	  if ($displayoptionintex == 0) {
+              my $texoptionlist = $optionlist;
+	      $texoptionlist =~ s/<option><\/option>/\\item \[\] The possible answers are:/;
+	      $texoptionlist =~ s/<option>/{\\bf /g;
+	      $texoptionlist =~ s/<\/option>/},/g;
+	      $texoptionlist =~ s/,$/\./g;
+	      $texoptionlist =~ s/>/\$>\$/g;
+	      $texoptionlist =~ s/</\$<\$/g;
+	      $texoptionlist =~ s/=/\$=\$/g;
+	      $result.= $texoptionlist.'\item '.$Apache::response::foilgroup{$name.'.text'};
+	      $displayoptionintex=1;
 	  } else {
 	      $result.= '\item '.$Apache::response::foilgroup{$name.'.text'};
 	  }