version 1.47, 2005/02/18 05:37:42
|
version 1.48, 2005/02/18 23:12:29
|
Line 438 sub end_reactionresponse {
|
Line 438 sub end_reactionresponse {
|
sub start_chem { |
sub start_chem { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; |
my $result = ''; |
my $result = ''; |
|
my $inside = &Apache::lonxml::get_all_text_unbalanced("/chem",$parser); |
if ($target eq 'tex' || $target eq 'web') { |
if ($target eq 'tex' || $target eq 'web') { |
&Apache::lonxml::startredirection(); |
$inside=&Apache::run::evaluate($inside,$safeeval,$$parstack[-1]); |
|
if (!$Apache::lonxml::default_homework_loaded) { |
|
&Apache::lonxml::default_homework_load($safeeval); |
|
} |
|
@Apache::scripttag::parser_env = @_; |
|
$result=&Apache::run::run("return &chemparse(q\0$inside\0);",$safeeval); |
} |
} |
return $result; |
return $result; |
} |
} |
Line 447 sub start_chem {
|
Line 453 sub start_chem {
|
sub end_chem { |
sub end_chem { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; |
my $result = ''; |
my $result = ''; |
if ($target eq 'tex' || $target eq 'web') { |
|
@Apache::scripttag::parser_env = @_; |
|
if (!$Apache::lonxml::default_homework_loaded) { |
|
&Apache::lonxml::default_homework_load($safeeval); |
|
} |
|
my $innards=&Apache::lonxml::endredirection(); |
|
$result=&Apache::run::run("return &chemparse(q\0$innards\0);",$safeeval); |
|
} |
|
return $result; |
return $result; |
} |
} |
|
|