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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Fri, 16 Nov 2007 08:44:37 -0000


albertel		Fri Nov 16 03:44:37 2007 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
  - BUG4074 - update to new set_buble_lines mechanism
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.219 loncom/homework/caparesponse/caparesponse.pm:1.220
--- loncom/homework/caparesponse/caparesponse.pm:1.219	Wed Aug 29 17:57:47 2007
+++ loncom/homework/caparesponse/caparesponse.pm	Fri Nov 16 03:44:37 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.219 2007/08/29 21:57:47 albertel Exp $
+# $Id: caparesponse.pm,v 1.220 2007/11/16 08:44:37 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -609,7 +609,6 @@
 	my $part_id="$partid.$id";
 	if ($target eq 'analyze') {
 	    push (@{ $Apache::lonhomework::analyze{"parts"} },$part_id);
-	    push (@{ $Apache::lonhomework::analyze{"$part_id.bubble_lines"} }, 1);
 	    $Apache::lonhomework::analyze{"$part_id.type"} = $tag;
 	    my (@incorrect)=&Apache::lonxml::get_param_var('incorrect',$parstack,$safeeval);
 	    if ($#incorrect eq 0) { @incorrect=(split(/,/,$incorrect[0])); }
@@ -788,7 +787,10 @@
     }
     if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || 
 	$target eq 'tex' || $target eq 'analyze') {
-	&Apache::lonxml::increment_counter($increment);
+	&Apache::lonxml::increment_counter($increment,"$partid.$id");
+	if ($target eq 'analyze') {
+	    &Apache::lonhomework::set_bubble_lines();
+	}
     }
     &Apache::response::end_response();
     return $result;
@@ -1228,7 +1230,11 @@
     }
     if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || 
 	$target eq 'tex' || $target eq 'analyze') {
-	&Apache::lonxml::increment_counter(&Apache::response::repetition());
+	&Apache::lonxml::increment_counter(&Apache::response::repetition(),
+					   "$part.$id");
+	if ($target eq 'analyze') {
+	    &Apache::lonhomework::set_bubble_lines();
+	}
     }
     &Apache::response::end_response;
     return $result;