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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 19 May 2003 21:40:04 -0000


albertel		Mon May 19 17:40:04 2003 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
  - fixes BUG#1370, stringresponse problems were blowing up when analyzed
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.102 loncom/homework/caparesponse/caparesponse.pm:1.103
--- loncom/homework/caparesponse/caparesponse.pm:1.102	Mon May 19 17:15:21 2003
+++ loncom/homework/caparesponse/caparesponse.pm	Mon May 19 17:40:04 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.102 2003/05/19 21:15:21 albertel Exp $
+# $Id: caparesponse.pm,v 1.103 2003/05/19 21:40:04 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -345,11 +345,10 @@
 							    "Unit: <b>$unit</b>");
 		}
 	    } elsif ($target eq 'analyze') {
-		push (@{ $Apache::lonhomework::analyze{"$part_id.unit"} },
-		      $unit);
+		push (@{ $Apache::lonhomework::analyze{"$part_id.unit"} }, $unit);
 	    }
 	}
-	if ($type || $token->[1] eq 'stringresponse') {
+	if ($type || $$tagstack[-1] eq 'stringresponse') {
 	    my $string='Case Insensitive';
 	    if ($type eq 'mc') {
 		$string='Multiple Choice';
@@ -369,7 +368,7 @@
 							    "<b>$string</b>");
 		}
 	    } elsif ($target eq 'analyze') {
-		push (@{ $Apache::lonhomework::analyze{"$part_id.type"} },
+		push (@{ $Apache::lonhomework::analyze{"$part_id.str_type"} },
 		      $type);
 	    }
 	}