--- loncom/xml/londefdef.pm 2007/07/13 18:35:20 1.373 +++ loncom/xml/londefdef.pm 2007/09/10 19:50:20 1.376 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.373 2007/07/13 18:35:20 albertel Exp $ +# $Id: londefdef.pm,v 1.376 2007/09/10 19:50:20 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -448,6 +448,16 @@ sub start_meta { if ((not defined $content) && (not defined $name)) { &Apache::lonxml::startredirection(); } + } elsif ($target eq 'edit') { + $currentstring .= &Apache::edit::tag_start($target,$token); + $currentstring .= &Apache::edit::text_arg('Name:','name',$token,30); + $currentstring .= &Apache::edit::text_arg('Content:','content',$token,70); + $currentstring .= &Apache::edit::end_row(); + } elsif ($target eq 'modified') { + my $constructtag = + &Apache::edit::get_new_args($token,$parstack,$safeeval, + 'name','content'); + if ($constructtag) { $currentstring = &Apache::edit::rebuild_tag($token); } } return $currentstring; } @@ -471,6 +481,11 @@ sub end_meta { return $currentstring; } +sub insert_meta { + return ' + '; +} + # accessrule sub start_accessrule { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; @@ -563,21 +578,27 @@ sub start_body { 'force_register' => 1}); if ($env{'request.state'} ne 'published') { - $currentstring.=&Apache::lonmenu::constspaceform(); - $currentstring.=(< - - -
-EDITBUTTON + } $currentstring.=&Apache::lonxml::message_location(); + $currentstring.=&Apache::londefdef::edit_controls(); } elsif ($target eq 'tex') { $currentstring = '\begin{document}'; } return $currentstring; } +sub edit_controls { + my $result = &Apache::lonmenu::constspaceform(); + $result .= (< + + +
+EDITBUTTON + return $result; +} + sub end_body { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # Close off unclosed

@@ -1253,9 +1274,7 @@ sub start_br { $signal = 1; } } - if ($signal eq 1) { - $currentstring .= ' \vskip 0 mm '; - } else { + if ($signal != 1) { $currentstring .= '\strut \\\\ \strut '; }