[LON-CAPA-cvs] cvs: loncom /homework imageresponse.pm matchresponse.pm optionresponse.pm radiobuttonresponse.pm rankresponse.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 15 Mar 2004 22:09:52 -0000
albertel Mon Mar 15 17:09:52 2004 EDT
Modified files:
/loncom/homework imageresponse.pm matchresponse.pm
optionresponse.pm radiobuttonresponse.pm
rankresponse.pm
Log:
- BUG#2835, Error either always or never showed up.
Index: loncom/homework/imageresponse.pm
diff -u loncom/homework/imageresponse.pm:1.51 loncom/homework/imageresponse.pm:1.52
--- loncom/homework/imageresponse.pm:1.51 Mon Mar 8 18:23:04 2004
+++ loncom/homework/imageresponse.pm Mon Mar 15 17:09:52 2004
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# image click response style
#
-# $Id: imageresponse.pm,v 1.51 2004/03/08 23:23:04 albertel Exp $
+# $Id: imageresponse.pm,v 1.52 2004/03/15 22:09:52 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -341,6 +341,7 @@
if (defined($Apache::response::foilnames{$name})) {
&Apache::lonxml::error(&mt("Foil name <b><tt>[_1]</tt></b> appears more than once. Foil names need to be unique.",$name));
}
+ $Apache::response::foilnames{$name}++;
if ( $Apache::imageresponse::conceptgroup
&& !&Apache::response::showallfoils()) {
push(@{ $Apache::response::conceptgroup{'names'} }, $name);
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.37 loncom/homework/matchresponse.pm:1.38
--- loncom/homework/matchresponse.pm:1.37 Mon Mar 8 18:23:04 2004
+++ loncom/homework/matchresponse.pm Mon Mar 15 17:09:52 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Full matching style response
#
-# $Id: matchresponse.pm,v 1.37 2004/03/08 23:23:04 albertel Exp $
+# $Id: matchresponse.pm,v 1.38 2004/03/15 22:09:52 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -601,6 +601,7 @@
if (defined($Apache::response::foilnames{$name})) {
&Apache::lonxml::error(&mt("Foil name <b><tt>[_1]</tt></b> appears more than once. Foil names need to be unique.",$name));
}
+ $Apache::response::foilnames{$name}++;
my $location =&Apache::lonxml::get_param('location',$parstack,
$safeeval);
if ( $Apache::matchresponse::conceptgroup
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.103 loncom/homework/optionresponse.pm:1.104
--- loncom/homework/optionresponse.pm:1.103 Mon Mar 8 18:23:04 2004
+++ loncom/homework/optionresponse.pm Mon Mar 15 17:09:52 2004
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.103 2004/03/08 23:23:04 albertel Exp $
+# $Id: optionresponse.pm,v 1.104 2004/03/15 22:09:52 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -568,13 +568,13 @@
my $value = &Apache::lonxml::get_param('value',$parstack,$safeeval);
if ($value ne 'unused') {
my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);
- $Apache::response::foilnames{$name}++;
&Apache::lonxml::debug("Got a name of :$name:");
if (!$name) { $name=$Apache::lonxml::curdepth; }
&Apache::lonxml::debug("Using a name of :$name:");
if (defined($Apache::response::foilnames{$name})) {
&Apache::lonxml::error(&mt("Foil name <b><tt>[_1]</tt></b> appears more than once. Foil names need to be unique.",$name));
}
+ $Apache::response::foilnames{$name}++;
my $location =&Apache::lonxml::get_param('location',$parstack,$safeeval);
if ( $Apache::optionresponse::conceptgroup
&& !&Apache::response::showallfoils() ) {
Index: loncom/homework/radiobuttonresponse.pm
diff -u loncom/homework/radiobuttonresponse.pm:1.85 loncom/homework/radiobuttonresponse.pm:1.86
--- loncom/homework/radiobuttonresponse.pm:1.85 Mon Mar 8 18:23:04 2004
+++ loncom/homework/radiobuttonresponse.pm Mon Mar 15 17:09:52 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# mutliple choice style responses
#
-# $Id: radiobuttonresponse.pm,v 1.85 2004/03/08 23:23:04 albertel Exp $
+# $Id: radiobuttonresponse.pm,v 1.86 2004/03/15 22:09:52 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -547,6 +547,7 @@
if (defined($Apache::response::foilnames{$name})) {
&Apache::lonxml::error(&mt("Foil name <b><tt>[_1]</tt></b> appears more than once. Foil names need to be unique.",$name));
}
+ $Apache::response::foilnames{$name}++;
my $location =&Apache::lonxml::get_param('location',$parstack,
$safeeval);
if ( $Apache::radiobuttonresponse::conceptgroup
Index: loncom/homework/rankresponse.pm
diff -u loncom/homework/rankresponse.pm:1.30 loncom/homework/rankresponse.pm:1.31
--- loncom/homework/rankresponse.pm:1.30 Mon Mar 8 18:23:04 2004
+++ loncom/homework/rankresponse.pm Mon Mar 15 17:09:52 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# rank style response
#
-# $Id: rankresponse.pm,v 1.30 2004/03/08 23:23:04 albertel Exp $
+# $Id: rankresponse.pm,v 1.31 2004/03/15 22:09:52 albertel Exp $
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -415,6 +415,7 @@
if (defined($Apache::response::foilnames{$name})) {
&Apache::lonxml::error(&mt("Foil name <b><tt>[_1]</tt></b> appears more than once. Foil names need to be unique.",$name));
}
+ $Apache::response::foilnames{$name}++;
my $location =&Apache::lonxml::get_param('location',$parstack,
$safeeval);
if ( $Apache::rankresponse::conceptgroup