[LON-CAPA-cvs] cvs: loncom /homework default_homework.lcpm

raeburn raeburn@source.lon-capa.org
Thu, 14 Oct 2010 04:59:08 -0000


raeburn		Thu Oct 14 04:59:08 2010 EDT

  Modified files:              
    /loncom/homework	default_homework.lcpm 
  Log:
  - Don't add trailing space if no unit to append.
  
  
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.147 loncom/homework/default_homework.lcpm:1.148
--- loncom/homework/default_homework.lcpm:1.147	Wed Jan  6 16:59:30 2010
+++ loncom/homework/default_homework.lcpm	Thu Oct 14 04:59:08 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # used by lonxml::xmlparse() as input variable $safeinit to Apache::run::run()
 #
-# $Id: default_homework.lcpm,v 1.147 2010/01/06 16:59:30 www Exp $
+# $Id: default_homework.lcpm,v 1.148 2010/10/14 04:59:08 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -343,7 +343,9 @@
           if (($element==0) && ($unit!~/\w/) && ($answerunit=~/\w/)) {
              $appendunit=$answerunit;
           }
-          $element .= " $appendunit";
+          if ($appendunit ne '') {
+              $element .= " $appendunit";
+          }  
           &LONCAPA_INTERNAL_DEBUG("Made response element :$element:");
        }
     }