[LON-CAPA-cvs] cvs: loncom /homework imageresponse.pm matchresponse.pm optionresponse.pm radiobuttonresponse.pm rankresponse.pm

foxr lon-capa-cvs-allow@mail.lon-capa.org
Wed, 29 Aug 2007 10:07:43 -0000


foxr		Wed Aug 29 06:07:43 2007 EDT

  Modified files:              
    /loncom/homework	imageresponse.pm matchresponse.pm 
                    	optionresponse.pm radiobuttonresponse.pm 
                    	rankresponse.pm 
  Log:
  Make anaylze target produce a bubble_lines entry that describes how many
  lines on an answer bubble sheet the problem requires for its answer.
  
  
Index: loncom/homework/imageresponse.pm
diff -u loncom/homework/imageresponse.pm:1.83 loncom/homework/imageresponse.pm:1.84
--- loncom/homework/imageresponse.pm:1.83	Tue Jun 19 16:23:56 2007
+++ loncom/homework/imageresponse.pm	Wed Aug 29 06:07:42 2007
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # image click response style
 #
-# $Id: imageresponse.pm,v 1.83 2007/06/19 20:23:56 banghart Exp $
+# $Id: imageresponse.pm,v 1.84 2007/08/29 10:07:42 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -60,6 +60,8 @@
     } elsif ($target eq 'analyze') {
 	my $part_id="$Apache::inputtags::part.$id";
 	push (@{ $Apache::lonhomework::analyze{"parts"} },$part_id);
+	push (@{ $Apache::lonhomework::analyze{"$part_id.bubble_lines"} },
+	      1);
     }
     return $result;
 }
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.64 loncom/homework/matchresponse.pm:1.65
--- loncom/homework/matchresponse.pm:1.64	Tue Apr 17 19:25:09 2007
+++ loncom/homework/matchresponse.pm	Wed Aug 29 06:07:42 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Full matching style response
 #
-# $Id: matchresponse.pm,v 1.64 2007/04/17 23:25:09 albertel Exp $
+# $Id: matchresponse.pm,v 1.65 2007/08/29 10:07:42 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -71,6 +71,8 @@
     } elsif ($target eq 'analyze') {
 	my $part_id="$Apache::inputtags::part.$id";
 	push (@{ $Apache::lonhomework::analyze{"parts"} },$part_id);
+	push (@{ $Apache::lonhomework::anaylze{"$part_id.bubble_lines"} },
+	      1);
     }
     return $result;
 }
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.144 loncom/homework/optionresponse.pm:1.145
--- loncom/homework/optionresponse.pm:1.144	Tue Jun 26 16:51:53 2007
+++ loncom/homework/optionresponse.pm	Wed Aug 29 06:07:42 2007
@@ -1,7 +1,7 @@
 # LearningOnline Network with CAPA
 # option list style responses
 #
-# $Id: optionresponse.pm,v 1.144 2007/06/26 20:51:53 albertel Exp $
+# $Id: optionresponse.pm,v 1.145 2007/08/29 10:07:42 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -71,6 +71,8 @@
   } elsif ($target eq 'analyze') {
     my $part_id="$Apache::inputtags::part.$id";
     push (@{ $Apache::lonhomework::analyze{"parts"} },$part_id);
+    push (@{ $Apache::lonhomeowrk::analyze{"$part_id.bubble_lines"} }, 1);
+
   }
   return $result;
 }
Index: loncom/homework/radiobuttonresponse.pm
diff -u loncom/homework/radiobuttonresponse.pm:1.125 loncom/homework/radiobuttonresponse.pm:1.126
--- loncom/homework/radiobuttonresponse.pm:1.125	Mon Aug  6 16:52:54 2007
+++ loncom/homework/radiobuttonresponse.pm	Wed Aug 29 06:07:42 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # mutliple choice style responses
 #
-# $Id: radiobuttonresponse.pm,v 1.125 2007/08/06 20:52:54 albertel Exp $
+# $Id: radiobuttonresponse.pm,v 1.126 2007/08/29 10:07:42 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -244,11 +244,17 @@
 	    } elsif ( $target eq 'grade') {
 		&grade_response($answer, \@shown, $bubbles_per_line);
 	    }  elsif ( $target eq 'analyze') {
+		my $bubble_lines = &bubble_line_count($answer_count, 
+						      $bubbles_per_line);
 		&Apache::response::analyze_store_foilgroup(\@shown,
 							   ['text','value','location']);
 		my $part_id="$Apache::inputtags::part.$Apache::inputtags::response[-1]";
 		push (@{ $Apache::lonhomework::analyze{"$part_id.options"} },
 		      ('true','false'));
+		push (@{ $Apache::lonhomework::analyze{"$part_id.bubble_lines"} },
+		      $bubble_lines);
+		my $hash_value = $Apache::lonhomework::analyze{"$part_id.bubble_lines"}[0];
+
 	    }
 	}
 	$Apache::lonxml::post_evaluate=0;
Index: loncom/homework/rankresponse.pm
diff -u loncom/homework/rankresponse.pm:1.52 loncom/homework/rankresponse.pm:1.53
--- loncom/homework/rankresponse.pm:1.52	Tue Apr 17 19:25:09 2007
+++ loncom/homework/rankresponse.pm	Wed Aug 29 06:07:42 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # rank style response
 #
-# $Id: rankresponse.pm,v 1.52 2007/04/17 23:25:09 albertel Exp $
+# $Id: rankresponse.pm,v 1.53 2007/08/29 10:07:42 foxr Exp $
 # Copyright Michigan State University Board of Trustees
 #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -67,6 +67,8 @@
     } elsif ($target eq 'analyze') {
 	my $part_id="$Apache::inputtags::part.$id";
 	push (@{ $Apache::lonhomework::analyze{"parts"} },$part_id);
+	push (@{ $Apache::lonhomework::analyze{"$part_id.bubble_lines"} }, 1);
+
     }
     return $result;
 }