[LON-CAPA-cvs] cvs: loncom /homework/caparesponse caparesponse.pm

sakharuk lon-capa-cvs@mail.lon-capa.org
Mon, 28 Jul 2003 18:29:06 -0000


sakharuk		Mon Jul 28 14:29:06 2003 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
  Bug 1268 (Answer box in middle of question text prints weird for exams) is fixed. Now you will see statement about units only if units are 1.defined and 2. units~=''. 
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.106 loncom/homework/caparesponse/caparesponse.pm:1.107
--- loncom/homework/caparesponse/caparesponse.pm:1.106	Thu Jul 24 09:25:37 2003
+++ loncom/homework/caparesponse/caparesponse.pm	Mon Jul 28 14:29:05 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.106 2003/07/24 13:25:37 sakharuk Exp $
+# $Id: caparesponse.pm,v 1.107 2003/07/28 18:29:05 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -247,7 +247,7 @@
                            </textarea></font> <br /><br />';
 		}
 	    } elsif ($target eq 'tex') {
-		if (defined $unit and $Apache::lonhomework::type eq 'exam') {
+		if ((defined $unit) and ($unit=~/\S/) and ($Apache::lonhomework::type eq 'exam')) {
 		    $result.=' \textit{(in} \verb|'.$unit.'|\textit{)} ';
 		}
 		if ($$tagstack[-1] eq 'numericalresponse') {