[LON-CAPA-cvs] cvs: loncom /homework imageresponse.pm optionresponse.pm radiobuttonresponse.pm rankresponse.pm
www
www@source.lon-capa.org
Tue, 07 Jun 2011 17:27:37 -0000
www Tue Jun 7 17:27:37 2011 EDT
Modified files:
/loncom/homework imageresponse.pm optionresponse.pm
radiobuttonresponse.pm rankresponse.pm
Log:
Bug #5771: foil name 0 does not work
Index: loncom/homework/imageresponse.pm
diff -u loncom/homework/imageresponse.pm:1.100 loncom/homework/imageresponse.pm:1.101
--- loncom/homework/imageresponse.pm:1.100 Sun Dec 19 01:08:11 2010
+++ loncom/homework/imageresponse.pm Tue Jun 7 17:27:37 2011
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# image click response style
#
-# $Id: imageresponse.pm,v 1.100 2010/12/19 01:08:11 raeburn Exp $
+# $Id: imageresponse.pm,v 1.101 2011/06/07 17:27:37 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -631,6 +631,9 @@
&Apache::lonxml::warning(&mt('Foils without names exist. This can cause problems to malfunction.'));
$name=$Apache::lonxml::curdepth;
}
+ if ($name eq "0") {
+ &Apache::lonxml::error(&mt('Foil name [_1] is not supported. Please choose another name.','<b><tt>'.$name.'</tt></b>'));
+ }
if (defined($Apache::response::foilnames{$name})) {
&Apache::lonxml::error(&mt("Foil name [_1] appears more than once. Foil names need to be unique."
,'<b><tt>'.$name.'</tt></b>'));
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.175 loncom/homework/optionresponse.pm:1.176
--- loncom/homework/optionresponse.pm:1.175 Mon Mar 7 19:42:21 2011
+++ loncom/homework/optionresponse.pm Tue Jun 7 17:27:37 2011
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.175 2011/03/07 19:42:21 www Exp $
+# $Id: optionresponse.pm,v 1.176 2011/06/07 17:27:37 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -850,6 +850,9 @@
&Apache::lonxml::warning(&mt('Foils without names exist. This can cause problems to malfunction.'));
$name=$Apache::lonxml::curdepth;
}
+ if ($name eq "0") {
+ &Apache::lonxml::error(&mt('Foil name [_1] is not supported. Please choose another name.','<b><tt>'.$name.'</tt></b>'));
+ }
&Apache::lonxml::debug("Using a name of :$name:");
if (defined($Apache::response::foilnames{$name})) {
&Apache::lonxml::error(&mt("Foil name [_1] appears more than once. Foil names need to be unique.",'<b><tt>'.$name.'</tt></b>'));
Index: loncom/homework/radiobuttonresponse.pm
diff -u loncom/homework/radiobuttonresponse.pm:1.148 loncom/homework/radiobuttonresponse.pm:1.149
--- loncom/homework/radiobuttonresponse.pm:1.148 Fri May 27 18:40:37 2011
+++ loncom/homework/radiobuttonresponse.pm Tue Jun 7 17:27:37 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# mutliple choice style responses
#
-# $Id: radiobuttonresponse.pm,v 1.148 2011/05/27 18:40:37 raeburn Exp $
+# $Id: radiobuttonresponse.pm,v 1.149 2011/06/07 17:27:37 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -815,6 +815,9 @@
&Apache::lonxml::warning(&mt('Foils without names exist. This can cause problems to malfunction.'));
$name=$Apache::lonxml::curdepth;
}
+ if ($name eq "0") {
+ &Apache::lonxml::error(&mt('Foil name [_1] is not supported. Please choose another name.','<b><tt>'.$name.'</tt></b>'));
+ }
if (defined($Apache::response::foilnames{$name})) {
&Apache::lonxml::error(&mt('Foil name [_1] appears more than once. Foil names need to be unique.','<b><tt>'.$name.'</tt></b>'));
}
Index: loncom/homework/rankresponse.pm
diff -u loncom/homework/rankresponse.pm:1.64 loncom/homework/rankresponse.pm:1.65
--- loncom/homework/rankresponse.pm:1.64 Sun Dec 19 00:48:50 2010
+++ loncom/homework/rankresponse.pm Tue Jun 7 17:27:37 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# rank style response
#
-# $Id: rankresponse.pm,v 1.64 2010/12/19 00:48:50 raeburn Exp $
+# $Id: rankresponse.pm,v 1.65 2011/06/07 17:27:37 www Exp $
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -538,6 +538,9 @@
$name=$Apache::lonxml::curdepth;
}
&Apache::lonxml::debug("Using a name of :$name:");
+ if ($name eq "0") {
+ &Apache::lonxml::error(&mt('Foil name [_1] is not supported. Please choose another name.','<b><tt>'.$name.'</tt></b>'));
+ }
if (defined($Apache::response::foilnames{$name})) {
&Apache::lonxml::error(&mt('Foil name [_1] appears more than once. Foil names need to be unique.','<b><tt>'.$name.'</tt></b>'));
}