--- loncom/xml/londefdef.pm 2003/08/26 21:31:19 1.168 +++ loncom/xml/londefdef.pm 2003/10/20 19:47:23 1.183 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.168 2003/08/26 21:31:19 albertel Exp $ +# $Id: londefdef.pm,v 1.183 2003/10/20 19:47:23 sakharuk Exp $ # # # Copyright Michigan State University Board of Trustees @@ -92,9 +92,15 @@ sub start_m { $Apache::lontexconvert::errorstring=''; } #&Apache::lonxml::debug("M is ends with:$currentstring:"); + $Apache::lonxml::post_evaluate=0; } elsif ($target eq 'tex') { $currentstring = &Apache::lonxml::get_all_text_unbalanced("/m",$parser); + my $eval=&Apache::lonxml::get_param('eval',$parstack,$safeeval); + if ($eval eq 'on') { + $currentstring=&Apache::run::evaluate($currentstring,$safeeval,$$parstack[-1]); + } if ($currentstring=~/^(\s*\\\\\s*)*$/) {$currentstring = ' \vskip 0 mm ';} + $Apache::lonxml::post_evaluate=0; } else { my $inside = &Apache::lonxml::get_all_text_unbalanced("/m",$parser); } @@ -134,7 +140,7 @@ sub end_tthoption { return $result; } -#-- tag +#-- tag (end tag optional) sub start_html { my ($target,$token) = @_; my $currentstring = ''; @@ -182,7 +188,7 @@ sub end_html { return $currentstring; } -#-- tag +#-- tag (end tag optional) sub start_head { my ($target,$token) = @_; my $currentstring = ''; @@ -195,14 +201,14 @@ sub start_head { sub end_head { my ($target,$token) = @_; my $currentstring = ''; - if ($target eq 'web') { + if ($target eq 'web' && $ENV{'request.state'} eq 'published') { $currentstring = &Apache::lonmenu::registerurl(undef,$target). $token->[2]; } return $currentstring; } -#-- tag +#-- tag (end tag required) sub start_map { my ($target,$token) = @_; my $currentstring = ''; @@ -221,13 +227,15 @@ sub end_map { return $currentstring; } -#-- tag (end tag required) sub start_select { my ($target,$token) = @_; my $currentstring = ''; if ($target eq 'web') { $currentstring = $token->[4]; - } + } elsif ($target eq 'tex') { + $Apache::londefdef::select=0; + } return $currentstring; } @@ -240,13 +248,20 @@ sub end_select { return $currentstring; } -#--