--- loncom/homework/edit.pm	2004/06/04 16:05:47	1.83
+++ loncom/homework/edit.pm	2004/08/19 21:01:54	1.86
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # edit mode helpers
 #
-# $Id: edit.pm,v 1.83 2004/06/04 16:05:47 www Exp $
+# $Id: edit.pm,v 1.86 2004/08/19 21:01:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -285,7 +285,8 @@ sub insert_responseparam {
 sub insert_formularesponse {
     return '
 <formularesponse answer="" samples="">
-    <textline />
+    <responseparam description="Numerical Tolerance" type="tolerance" default="0.00001" name="tol" />
+    <textline size="25"/>
     <hintgroup>
     <startouttext /><endouttext />
     </hintgroup>
@@ -487,7 +488,11 @@ sub editfield {
     my ($tag,$data,$description,$minwidth,$minheight,$usehtmlarea)=@_;
 
     my ($rows,$cols)=&textarea_sizes(\$data);
-    $rows+=5; # make room for HTMLarea
+    if (&Apache::lonhtmlcommon::htmlareabrowser() &&
+	!&Apache::lonhtmlcommon::htmlareablocked()) {
+	$rows+=7;      # make room for HTMLarea
+	$minheight+=7; # make room for HTMLarea
+    }
     if ($cols > 80) { $cols = 80; }
     if ($cols < $minwidth ) { $cols = $minwidth; }
     if ($rows < $minheight) { $rows = $minheight; }
@@ -500,7 +505,9 @@ sub editfield {
 	'" cols="'.$cols.'" name="homework_edit_'.
 	$Apache::lonxml::curdepth.'" id="homework_edit_'.
 	$Apache::lonxml::curdepth.'">'.
-	&HTML::Entities::encode($data,'<>&"').'</textarea>'."\n";
+	&HTML::Entities::encode($data,'<>&"').'</textarea>'.
+	($usehtmlarea?&Apache::lonhtmlcommon::spelllink('lonhomework',
+			 'homework_edit_'.$Apache::lonxml::curdepth):'')."\n";
 }
 
 sub modifiedfield {