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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 27 May 2004 03:44:18 -0000


albertel		Wed May 26 23:44:18 2004 EDT

  Modified files:              
    /loncom/homework	default_homework.lcpm 
  Log:
  - doing some cleanup
  
  
Index: loncom/homework/default_homework.lcpm
diff -u loncom/homework/default_homework.lcpm:1.81 loncom/homework/default_homework.lcpm:1.82
--- loncom/homework/default_homework.lcpm:1.81	Tue May 18 19:12:15 2004
+++ loncom/homework/default_homework.lcpm	Wed May 26 23:44:18 2004
@@ -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.81 2004/05/18 23:12:15 albertel Exp $
+# $Id: default_homework.lcpm,v 1.82 2004/05/27 03:44:18 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -142,7 +142,7 @@
     elsif ($result =='15') { $result='UNIT_IRRECONCIBLE'; }
     else  {$result = "ERROR: Unknown Result:$result:$@:";}
 
-    return ("$result:\nRetError $reterror:\nError $error:\nAnswer $answer:\nResponse $response:\n type-$type|$tol|$tol_type|$sig:$sig_lbound:$sig_ubound|$unit|\n$message",$reterror);
+    return ("$result:\nRetError $reterror:\nAnswer $answer:\nResponse $response:\n type-$type|$tol|$tol_type|$sig:$sig_lbound:$sig_ubound|$unit|\n$message",$reterror);
 }
 
 
@@ -172,7 +172,7 @@
 	    $unit=$2;
 	}
     }
-    $result.="Final final response :$responselist['-1']:\n";
+    $result.="Final final response :$responselist['-1']:$unit:\n";
     $result.=":$#list: answers\n";
     $unit=~s/\s//;
     my $i=0;
@@ -484,11 +484,7 @@
     if ($fmt =~ /^([^\d]*)(.*)/) { $options=$1; $fmt=$2; } 
     #if ($options =~ /\$/) { $dollamode=1; }
     #if ($options =~ /,/)  { $commamode=1; }
-    if ($options =~ /\./) {
-	$alwaysperiod=1;
-	&LONCAPA_INTERNAL_DEBUG("hrrm setting it to 1");
-    }
-    &LONCAPA_INTERNAL_DEBUG("alwyas per $alwaysperiod opt $options fmt $fmt");
+    if ($options =~ /\./) { $alwaysperiod=1; }
     $fmt=~s/e/E/g;
     my $result=sprintf('%.'.$fmt,$value);
     if ($alwaysperiod && $fmt eq '0f') { $result .='.'; }