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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 31 May 2002 22:19:06 -0000


albertel		Fri May 31 18:19:06 2002 EDT

  Modified files:              
    /loncom/homework	default_homework.lcpm 
  Log:
  - fixing prettyprint to not print an exponenet in E mode if it is 0 (BUG#485)
  
  
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.46 loncom/homework/default_homework.lcpm:1.47
--- loncom/homework/default_homework.lcpm:1.46	Wed Feb  6 11:18:26 2002
+++ loncom/homework/default_homework.lcpm	Fri May 31 18:19:06 2002
@@ -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.46 2002/02/06 16:18:26 albertel Exp $
+# $Id: default_homework.lcpm,v 1.47 2002/05/31 22:19:06 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -453,6 +453,7 @@
     my $frac=$1;
     my $exponent=$2;
     $exponent=~s/^\+0*//;
+    if (!$exponent) { return $frac; }
     if ($external::target eq 'web') {
       $result=$frac.'&#215;10<sup>'.$exponent.'</sup>';
     } elsif ($external::target eq 'tex') {