--- loncom/xml/londefdef.pm 2003/02/05 23:17:32 1.111 +++ loncom/xml/londefdef.pm 2003/02/14 19:35:55 1.113 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.111 2003/02/05 23:17:32 albertel Exp $ +# $Id: londefdef.pm,v 1.113 2003/02/14 19:35:55 www Exp $ # # # Copyright Michigan State University Board of Trustees @@ -49,6 +49,7 @@ use strict; use Apache::lonxml; use Apache::File(); use Image::Magick; +use Apache::lonmenu; BEGIN { @@ -183,7 +184,7 @@ sub start_html { my ($target,$token) = @_; my $currentstring = ''; if ($target eq 'web') { - $currentstring = &Apache::lonxml::registerurl(undef,$target). + $currentstring = &Apache::lonmenu::registerurl(undef,$target). $token->[2]; } return $currentstring; @@ -327,7 +328,7 @@ sub start_html { my $args=''; if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } if ($args eq '') { - &Apache::lonxml::get_all_text("/meta",$$parser[$#$parser]); + &Apache::lonxml::get_all_text("/meta",$parser); } else { $currentstring = $token->[4]; } @@ -365,7 +366,7 @@ sub start_html { if ($target eq 'web') { if (!$Apache::lonxml::registered) { $currentstring.=''. - &Apache::lonxml::registerurl(undef,$target).''; + &Apache::lonmenu::registerurl(undef,$target).''; } my $onLoad=''; foreach my $key (keys(%{$token->[2]})) { @@ -374,7 +375,7 @@ sub start_html { delete($token->[2]->{$key}); } } - $token->[2]->{'onload'}=&Apache::lonxml::loadevents(). + $token->[2]->{'onload'}=&Apache::lonmenu::loadevents(). ';'.$onLoad; my $onUnload=''; foreach my $key (keys(%{$token->[2]})) { @@ -383,7 +384,7 @@ sub start_html { delete($token->[2]->{$key}); } } - $token->[2]->{'onunload'}=&Apache::lonxml::unloadevents(). + $token->[2]->{'onunload'}=&Apache::lonmenu::unloadevents(). ';'.$onUnload; $currentstring .= '<'.$token->[1]; @@ -397,7 +398,9 @@ sub start_html { EDITBUTTON - } + } else { + $currentstring.=&Apache::lonmenu::menubuttons(undef,$target); + } } elsif ($target eq 'tex') { $currentstring = '\begin{document}'; } @@ -1789,7 +1792,7 @@ sub end_allow { if ($target eq 'web') { if (!$Apache::lonxml::registered) { $currentstring.=''. - &Apache::lonxml::registerurl(undef,$target).''; + &Apache::lonmenu::registerurl(undef,$target).''; } $currentstring .= $token->[4]; }