--- loncom/homework/edit.pm 2003/10/24 21:45:32 1.69 +++ loncom/homework/edit.pm 2003/10/30 20:52:54 1.70 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # edit mode helpers # -# $Id: edit.pm,v 1.69 2003/10/24 21:45:32 albertel Exp $ +# $Id: edit.pm,v 1.70 2003/10/30 20:52:54 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -482,7 +482,7 @@ sub editfield { } sub modifiedfield { - my ($token) = @_; + my ($endtag,$parser) = @_; my $result; # foreach my $envkey (sort keys %ENV) { # &Apache::lonxml::debug("$envkey ---- $ENV{$envkey}"); @@ -490,6 +490,9 @@ sub modifiedfield { # &Apache::lonxml::debug("I want homework_edit_$Apache::lonxml::curdepth"); # &Apache::lonxml::debug($ENV{"form.homework_edit_$Apache::lonxml::curdepth"}); $result=$ENV{"form.homework_edit_$Apache::lonxml::curdepth"}; + my $bodytext=&Apache::lonxml::get_all_text($endtag,$parser); + # textareas throw away intial \n + if ($bodytext=~/^\n/) { $result="\n".$result; } return $result; }