[LON-CAPA-cvs] cvs: loncom /homework chemresponse.pm essayresponse.pm externalresponse.pm imageresponse.pm matchresponse.pm optionresponse.pm radiobuttonresponse.pm rankresponse.pm response.pm
foxr
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 15 Oct 2007 09:47:31 -0000
This is a MIME encoded message
--foxr1192441651
Content-Type: text/plain
foxr Mon Oct 15 05:47:31 2007 EDT
Modified files:
/loncom/homework chemresponse.pm essayresponse.pm
externalresponse.pm imageresponse.pm
matchresponse.pm optionresponse.pm
radiobuttonresponse.pm rankresponse.pm response.pm
Log:
BZ 4074 Ensure the bubble lines chunk of the analysis hash gets
keyed by the concatenation of partid.resopnseid.
--foxr1192441651
Content-Type: text/plain
Content-Disposition: attachment; filename="foxr-20071015054731.txt"
Index: loncom/homework/chemresponse.pm
diff -u loncom/homework/chemresponse.pm:1.74 loncom/homework/chemresponse.pm:1.75
--- loncom/homework/chemresponse.pm:1.74 Mon Oct 8 05:22:50 2007
+++ loncom/homework/chemresponse.pm Mon Oct 15 05:47:29 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# chemical equation style response
#
-# $Id: chemresponse.pm,v 1.74 2007/10/08 09:22:50 foxr Exp $
+# $Id: chemresponse.pm,v 1.75 2007/10/15 09:47:29 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -334,7 +334,8 @@
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' ||
$target eq 'tex' || $target eq 'analyze') {
- &Apache::lonxml::increment_counter(&Apache::response::repetition(), $partid);
+ &Apache::lonxml::increment_counter(&Apache::response::repetition(),
+ "$partid.$id"); # part.response
if ($target eq 'analyze') {
&Apache::lonhomework::set_bubble_lines();
}
@@ -563,7 +564,7 @@
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' ||
$target eq 'tex' || $target eq 'analyze') {
- &Apache::lonxml::increment_counter(&Apache::response::repetition(), $partid);
+ &Apache::lonxml::increment_counter(&Apache::response::repetition(), "$partid.$id");
}
&Apache::response::end_response();
return $result;
Index: loncom/homework/essayresponse.pm
diff -u loncom/homework/essayresponse.pm:1.85 loncom/homework/essayresponse.pm:1.86
--- loncom/homework/essayresponse.pm:1.85 Mon Oct 8 05:22:50 2007
+++ loncom/homework/essayresponse.pm Mon Oct 15 05:47:29 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.85 2007/10/08 09:22:50 foxr Exp $
+# $Id: essayresponse.pm,v 1.86 2007/10/15 09:47:29 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -184,7 +184,7 @@
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' ||
$target eq 'tex' || $target eq 'analyze') {
- &Apache::lonxml::increment_counter($increment, $part);
+ &Apache::lonxml::increment_counter($increment, "$part.$id");
if ($target eq 'analyze') {
&Apache::lonhomework::set_bubble_lines();
Index: loncom/homework/externalresponse.pm
diff -u loncom/homework/externalresponse.pm:1.11 loncom/homework/externalresponse.pm:1.12
--- loncom/homework/externalresponse.pm:1.11 Mon Oct 8 05:22:50 2007
+++ loncom/homework/externalresponse.pm Mon Oct 15 05:47:29 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# external style responses
#
-# $Id: externalresponse.pm,v 1.11 2007/10/08 09:22:50 foxr Exp $
+# $Id: externalresponse.pm,v 1.12 2007/10/15 09:47:29 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -122,7 +122,7 @@
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' ||
$target eq 'tex' || $target eq 'analyze') {
- &Apache::lonxml::increment_counter($increment, $part);
+ &Apache::lonxml::increment_counter($increment, "$part.$id");
if ($target eq 'analyze') {
&Apache::lonhomework::set_bubble_lines();
Index: loncom/homework/imageresponse.pm
diff -u loncom/homework/imageresponse.pm:1.89 loncom/homework/imageresponse.pm:1.90
--- loncom/homework/imageresponse.pm:1.89 Mon Oct 8 05:22:50 2007
+++ loncom/homework/imageresponse.pm Mon Oct 15 05:47:29 2007
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# image click response style
#
-# $Id: imageresponse.pm,v 1.89 2007/10/08 09:22:50 foxr Exp $
+# $Id: imageresponse.pm,v 1.90 2007/10/15 09:47:29 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -79,7 +79,8 @@
sub end_imageresponse {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
- my $part_id = $Apache::inputtags::part;
+ my $part_id = $Apache::inputtags::part;
+ my $response_id = $Apache::inputtags::response[-1];
pop(@Apache::lonxml::namespace);
&Apache::lonxml::deregister('Apache::imageresponse',('foilgroup','foil','text','image','rectangle','conceptgroup'));
@@ -97,7 +98,7 @@
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' ||
$target eq 'tex' || $target eq 'analyze') {
&Apache::lonxml::increment_counter(&Apache::response::repetition(),
- $part_id);
+ "$part_id.$response_id");
if ($target eq 'analyze') {
&Apache::lonhomework::set_bubble_lines();
}
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.66 loncom/homework/matchresponse.pm:1.67
--- loncom/homework/matchresponse.pm:1.66 Mon Oct 8 05:22:50 2007
+++ loncom/homework/matchresponse.pm Mon Oct 15 05:47:29 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Full matching style response
#
-# $Id: matchresponse.pm,v 1.66 2007/10/08 09:22:50 foxr Exp $
+# $Id: matchresponse.pm,v 1.67 2007/10/15 09:47:29 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -261,6 +261,9 @@
sub end_foilgroup {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
my $result;
+ my $part = $Apache::inputtags::part;
+ my $response_id = $Apache::inputtages::response[-1];
+
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || $target eq 'tex' || $target eq 'analyze') {
my $max = &Apache::lonxml::get_param('max',$parstack,$safeeval,'-2');
my $randomize = &Apache::lonxml::get_param('randomize',$parstack,
@@ -279,7 +282,7 @@
#FIXME need to store options in some way
}
&Apache::lonxml::increment_counter(&getfoilcounts($max),
- $Apache::inputtags::part);
+ "$part.$response_id");
if ($target eq 'analyze') {
&Apache::lonhomework::set_bubble_lines();
}
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.146 loncom/homework/optionresponse.pm:1.147
--- loncom/homework/optionresponse.pm:1.146 Mon Oct 8 05:22:50 2007
+++ loncom/homework/optionresponse.pm Mon Oct 15 05:47:29 2007
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.146 2007/10/08 09:22:50 foxr Exp $
+# $Id: optionresponse.pm,v 1.147 2007/10/15 09:47:29 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -277,8 +277,10 @@
}
}
}
+ my $part_id = $Apache::inputtags::part;
+ my $response_id = $Apache::inputtags::response[-1];
&Apache::lonxml::increment_counter(&getfoilcounts($max),
- $Apache::inputtags::part);
+ "$part_id.$response_id");
if ($target eq 'analyze') {
&Apache::lonhomework::set_bubble_lines();
}
Index: loncom/homework/radiobuttonresponse.pm
diff -u loncom/homework/radiobuttonresponse.pm:1.128 loncom/homework/radiobuttonresponse.pm:1.129
--- loncom/homework/radiobuttonresponse.pm:1.128 Mon Oct 8 05:22:50 2007
+++ loncom/homework/radiobuttonresponse.pm Mon Oct 15 05:47:29 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# mutliple choice style responses
#
-# $Id: radiobuttonresponse.pm,v 1.128 2007/10/08 09:22:50 foxr Exp $
+# $Id: radiobuttonresponse.pm,v 1.129 2007/10/15 09:47:29 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -200,7 +200,8 @@
my $bubble_lines;
my $bubbles_per_line;
my $answer_count;
- my $id = $Apache::inputtags::response['-1'];
+ my $id = $Apache::inputtags::response['-1'];
+ my $part = $Apache::inputtags::part;
$bubbles_per_line =
&Apache::response::get_response_param($Apache::inputtags::part."_$id",
'numbubbles',
@@ -246,7 +247,7 @@
$bubbles_per_line);
&Apache::response::analyze_store_foilgroup(\@shown,
['text','value','location']);
- my $part_id="$Apache::inputtags::part.$Apache::inputtags::response[-1]";
+ my $part_id="$part.$id";
push (@{ $Apache::lonhomework::analyze{"$part_id.options"} },
('true','false'));
push (@{ $Apache::lonhomework::analyze{"$part_id.bubble_lines"} },
@@ -262,7 +263,7 @@
&Apache::response::poprandomnumber();
$bubble_lines = &bubble_line_count($answer_count, $bubbles_per_line);
&Apache::lonxml::increment_counter($bubble_lines,
- $id);
+ "$part.$id");
if ($target eq 'analyze') {
&Apache::lonhomework::set_bubble_lines();
}
Index: loncom/homework/rankresponse.pm
diff -u loncom/homework/rankresponse.pm:1.54 loncom/homework/rankresponse.pm:1.55
--- loncom/homework/rankresponse.pm:1.54 Mon Oct 8 05:22:50 2007
+++ loncom/homework/rankresponse.pm Mon Oct 15 05:47:29 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# rank style response
#
-# $Id: rankresponse.pm,v 1.54 2007/10/08 09:22:50 foxr Exp $
+# $Id: rankresponse.pm,v 1.55 2007/10/15 09:47:29 foxr Exp $
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -120,8 +120,10 @@
"$Apache::inputtags::part.$Apache::inputtags::response[-1]";
$Apache::lonhomework::analyze{"$part_id.tol"}=$tol;
}
+ my $part = $Apache::inputtags::part;
+ my $id = $Apache::inputtags::response[-1];
&Apache::lonxml::increment_counter(&getfoilcounts($max),
- $Apache::inputtags::part);
+ "$part.$id");
if ($target eq 'analyze') {
&Apache::lonhomework::set_bubble_lines();
}
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.179 loncom/homework/response.pm:1.180
--- loncom/homework/response.pm:1.179 Mon Oct 8 05:22:50 2007
+++ loncom/homework/response.pm Mon Oct 15 05:47:29 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.179 2007/10/08 09:22:50 foxr Exp $
+# $Id: response.pm,v 1.180 2007/10/15 09:47:29 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -452,7 +452,7 @@
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' ||
$target eq 'tex' || $target eq 'analyze') {
&Apache::lonxml::increment_counter(&Apache::response::repetition(),
- $part);
+ "$part.$id");
if ($target eq 'analyze') {
&Apache::lonhomework::set_bubble_lines();
}
--foxr1192441651--