--- loncom/xml/lonxml.pm 2007/02/23 00:39:35 1.440 +++ loncom/xml/lonxml.pm 2007/04/07 00:02:31 1.441 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.440 2007/02/23 00:39:35 albertel Exp $ +# $Id: lonxml.pm,v 1.441 2007/04/07 00:02:31 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -585,17 +585,23 @@ sub callsub { } elsif ($token->[0] eq 'E') { $currentstring = &Apache::edit::tag_end($target,$token); } - } elsif ($target eq 'modified') { + } + } + if ($target eq 'modified' && $nodefault eq '') { + if ($currentstring eq '') { + if ($token->[0] eq 'S') { + $currentstring = $token->[4]; + } elsif ($token->[0] eq 'E') { + $currentstring = $token->[2]; + } else { + $currentstring = $token->[2]; + } + } if ($token->[0] eq 'S') { - $currentstring = $token->[4]; $currentstring.=&Apache::edit::handle_insert(); } elsif ($token->[0] eq 'E') { - $currentstring = $token->[2]; $currentstring.=&Apache::edit::handle_insertafter($token->[1]); - } else { - $currentstring = $token->[2]; } - } } } use strict 'refs';