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

raeburn raeburn at source.lon-capa.org
Fri Sep 16 18:24:01 EDT 2011


raeburn		Fri Sep 16 22:24:01 2011 EDT

  Modified files:              
    /loncom/homework	imageresponse.pm rankresponse.pm optionresponse.pm 
                    	radiobuttonresponse.pm 
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Bug 5771
    - Fix underlying cause in lonnet::hashref2str().
    - Preferred to earlier fix (now reverted).
      - Revert earlier changes in *response.pm to report foil name of 0
        as an error.
  
  
Index: loncom/homework/imageresponse.pm
diff -u loncom/homework/imageresponse.pm:1.101 loncom/homework/imageresponse.pm:1.102
--- loncom/homework/imageresponse.pm:1.101	Tue Jun  7 17:27:37 2011
+++ loncom/homework/imageresponse.pm	Fri Sep 16 22:23:54 2011
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # image click response style
 #
-# $Id: imageresponse.pm,v 1.101 2011/06/07 17:27:37 www Exp $
+# $Id: imageresponse.pm,v 1.102 2011/09/16 22:23:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -631,9 +631,6 @@
 	    &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.66 loncom/homework/rankresponse.pm:1.67
--- loncom/homework/rankresponse.pm:1.66	Tue Sep 13 21:42:58 2011
+++ loncom/homework/rankresponse.pm	Fri Sep 16 22:23:54 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # rank style response
 #
-# $Id: rankresponse.pm,v 1.66 2011/09/13 21:42:58 raeburn Exp $
+# $Id: rankresponse.pm,v 1.67 2011/09/16 22:23:54 raeburn Exp $
 # Copyright Michigan State University Board of Trustees
 #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -593,9 +593,6 @@
 		$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>'));
 	    }
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.178 loncom/homework/optionresponse.pm:1.179
--- loncom/homework/optionresponse.pm:1.178	Fri Sep 16 02:27:59 2011
+++ loncom/homework/optionresponse.pm	Fri Sep 16 22:23:54 2011
@@ -1,7 +1,7 @@
 # LearningOnline Network with CAPA
 # option list style responses
 #
-# $Id: optionresponse.pm,v 1.178 2011/09/16 02:27:59 raeburn Exp $
+# $Id: optionresponse.pm,v 1.179 2011/09/16 22:23:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -914,9 +914,6 @@
 	  &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.151 loncom/homework/radiobuttonresponse.pm:1.152
--- loncom/homework/radiobuttonresponse.pm:1.151	Tue Sep 13 21:42:58 2011
+++ loncom/homework/radiobuttonresponse.pm	Fri Sep 16 22:23:54 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # mutliple choice style responses
 #
-# $Id: radiobuttonresponse.pm,v 1.151 2011/09/13 21:42:58 raeburn Exp $
+# $Id: radiobuttonresponse.pm,v 1.152 2011/09/16 22:23:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -851,9 +851,6 @@
 		&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/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1131 loncom/lonnet/perl/lonnet.pm:1.1132
--- loncom/lonnet/perl/lonnet.pm:1.1131	Thu Sep  1 02:47:57 2011
+++ loncom/lonnet/perl/lonnet.pm	Fri Sep 16 22:24:01 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1131 2011/09/01 02:47:57 raeburn Exp $
+# $Id: lonnet.pm,v 1.1132 2011/09/16 22:24:01 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3986,7 +3986,7 @@
       $result.='=';
       #print("Got a ref of ".(ref($key))." skipping.");
     } else {
-	if ($key) {$result.=&escape($key).'=';} else { last; }
+	if (defined($key)) {$result.=&escape($key).'=';} else { last; }
     }
 
     if(ref($hashref->{$key}) eq 'ARRAY') {




More information about the LON-CAPA-cvs mailing list