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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 20 Jun 2005 21:30:25 -0000


albertel		Mon Jun 20 17:30:25 2005 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
  - when checking the instructors answer for correctness need to throw the unit in there
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.168 loncom/homework/caparesponse/caparesponse.pm:1.169
--- loncom/homework/caparesponse/caparesponse.pm:1.168	Mon May 23 17:18:25 2005
+++ loncom/homework/caparesponse/caparesponse.pm	Mon Jun 20 17:30:22 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.168 2005/05/23 21:18:25 albertel Exp $
+# $Id: caparesponse.pm,v 1.169 2005/06/20 21:30:22 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -352,6 +352,11 @@
 		#}
 	    }
 	    my $response=$ans;
+	    if ($unit) {
+		my $cleanunit=$unit;
+		$cleanunit=~s/\$\,//g;
+		$response.=" $cleanunit";
+	    }
 	    if ($target eq 'answer') {
 		if ($high && $tag eq 'numericalresponse') { $ans.=' ['.$low.','.$high.']'; }
 		if (defined($sighigh) && $tag eq 'numericalresponse') {