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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 19 Sep 2003 21:48:00 -0000


albertel		Fri Sep 19 17:48:00 2003 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
  - BUG 1879, dont='t do little e format
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.108 loncom/homework/caparesponse/caparesponse.pm:1.109
--- loncom/homework/caparesponse/caparesponse.pm:1.108	Thu Aug 21 13:33:22 2003
+++ loncom/homework/caparesponse/caparesponse.pm	Fri Sep 19 17:48:00 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.108 2003/08/21 17:33:22 sakharuk Exp $
+# $Id: caparesponse.pm,v 1.109 2003/09/19 21:48:00 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -194,6 +194,7 @@
 		}
 		my $formatted;
 		if ((defined($format)) && ($format ne '')) {
+		    $format=~s/e/E/g;
 		    &Apache::lonxml::debug("formatting with :$format: answer :$answer:");
 		    $formatted=sprintf('%.'.$format,$answer).',';
 		} else {
@@ -416,6 +417,7 @@
     my ($number,$format,$target)=@_;
     my $ans;
     if ($format ne '') {
+	$format=~s/e/E/g;
 	$ans = sprintf('%.'.$format,$number);
     } else {
 	my $format = '';