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

sakharuk lon-capa-cvs@mail.lon-capa.org
Thu, 13 Mar 2003 16:24:13 -0000


sakharuk		Thu Mar 13 11:24:13 2003 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
   Sorry, I was in hurry and put this code in the wrong place. Corrected.
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.82 loncom/homework/caparesponse/caparesponse.pm:1.83
--- loncom/homework/caparesponse/caparesponse.pm:1.82	Thu Mar 13 11:20:47 2003
+++ loncom/homework/caparesponse/caparesponse.pm	Thu Mar 13 11:24:13 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.82 2003/03/13 16:20:47 sakharuk Exp $
+# $Id: caparesponse.pm,v 1.83 2003/03/13 16:24:13 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -215,9 +215,6 @@
       	my (@answers)=&Apache::lonxml::get_param_var('answer',$parstack,$safeeval);
 	my (@formats)=&Apache::lonxml::get_param_var('format',$parstack,$safeeval);
 	my $unit=&Apache::lonxml::get_param_var('unit',$parstack,$safeeval);
-	if (defined $unit and $Apache::lonhomework::type eq 'exam') {
-	  $result.=' \textit{(in} \verb|'.$unit.'|\textit{)} ';
-        }
 	my $number_of_bubbles = 8; #default values for number of bubbles
 	my @bubbles_values = (); 
 	my @factors = (1.13,1.17,1.25,1.33,1.45); #default values of factors
@@ -265,6 +262,9 @@
 	    $result.= '<br /><br /><font color="red"> Formula have to be entered here! </font><br /><br />';
 	  }
 	} elsif ($target eq 'tex') {
+	 if (defined $unit and $Apache::lonhomework::type eq 'exam') {
+	   $result.=' \textit{(in} \verb|'.$unit.'|\textit{)} ';
+         }
 	 if ($$tagstack[-1] eq 'numericalresponse') {
 	     my $max_val = 0;
 	     if ($formats[0]=~m/^(\d+)E([^\d]*)(\d*)$/) {