--- loncom/xml/londefdef.pm 2007/10/15 20:00:12 1.375.2.1 +++ loncom/xml/londefdef.pm 2007/12/06 11:22:37 1.380 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.375.2.1 2007/10/15 20:00:12 albertel Exp $ +# $Id: londefdef.pm,v 1.380 2007/12/06 11:22:37 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -579,12 +579,7 @@ sub start_body { if ($env{'request.state'} ne 'published') { $currentstring.=&Apache::lonmenu::constspaceform(); - $currentstring.=(< - - -
-EDITBUTTON + $currentstring.=&Apache::londefdef::edit_controls(); } $currentstring.=&Apache::lonxml::message_location(); } elsif ($target eq 'tex') { @@ -593,6 +588,16 @@ EDITBUTTON return $currentstring; } +sub edit_controls { + my $result .= (< + + +
+EDITBUTTON + return $result; +} + sub end_body { my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = &end_p(); # Close off unclosed

@@ -1580,6 +1585,9 @@ sub start_div { } if ($target eq 'tex') { # 4 possible alignments: left, right, center, and -missing-. + # If inside a table row, we must let the table logic + # do the alignment, however. + # my $endstring = ''; @@ -1590,6 +1598,7 @@ sub start_div { $endstring = '\end{center}'; if (&is_inside_of($tagstack, "table")) { $currentstring = ¢er_correction().$currentstring; + $endstring .= ¢er_end_correction(); } } elsif ($align eq 'right') {