version 1.41, 2001/06/26 21:45:58
|
version 1.45, 2001/07/11 14:44:37
|
Line 6 package Apache::scripttag;
|
Line 6 package Apache::scripttag;
|
|
|
use strict; |
use strict; |
use Apache::lonnet; |
use Apache::lonnet; |
|
use Apache::style; |
|
|
sub BEGIN { |
sub BEGIN { |
&Apache::lonxml::register('Apache::scripttag',('script','scriptlib', |
&Apache::lonxml::register('Apache::scripttag',('script','scriptlib', |
'parserlib','import', |
'parserlib','import', |
'window','display')); |
'window','display', |
|
'storetc','physnet')); |
} |
} |
|
|
sub start_script { |
sub start_script { |
Line 121 sub start_parserlib {
|
Line 123 sub start_parserlib {
|
my $bodytext; |
my $bodytext; |
my $result =""; |
my $result =""; |
my $error=''; |
my $error=''; |
|
|
if ($target eq 'web' || $target eq 'grade' || $target eq 'meta' || $target eq 'edit') { |
if ($target eq 'web' || $target eq 'grade' || $target eq 'meta' || $target eq 'edit') { |
$bodytext=$$parser[$#$parser]->get_text("/parserlib"); |
$bodytext=$$parser[$#$parser]->get_text("/parserlib"); |
$bodytext=&Apache::run::evaluate($bodytext,$safeeval, |
$bodytext=&Apache::run::evaluate($bodytext,$safeeval, |
Line 169 sub start_window {
|
Line 170 sub start_window {
|
if ($target eq 'web') { |
if ($target eq 'web') { |
&Apache::lonxml::startredirection; |
&Apache::lonxml::startredirection; |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
$result = '\footnote{'; |
$result = '\unskip\footnote{'; |
} |
} |
return $result; |
return $result; |
} |
} |
Line 215 sub start_import {
|
Line 216 sub start_import {
|
} |
} |
|
|
sub end_import { |
sub end_import { |
|
return ''; |
} |
} |
|
|
sub start_meta { |
sub start_meta { |
Line 232 sub start_meta {
|
Line 234 sub start_meta {
|
sub end_meta { |
sub end_meta { |
} |
} |
|
|
|
sub start_storetc { |
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
|
my $result = ''; |
|
&Apache::lonxml::startredirection; |
|
return $result; |
|
} |
|
|
|
sub end_storetc { |
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
|
my $result; |
|
my $output=&Apache::lonxml::endredirection; |
|
$output =~ s/\"/\"\;/g; |
|
$result = "{\bf $output.}}\write\tcfile{\protect\tcpc{ $output.}{\the\value{relpage}}}"; |
|
return $result; |
|
} |
|
|
|
|
|
sub start_physnet { |
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
|
my $bodytext = '/msu/physnet/cbi.sty'; |
|
my $location=&Apache::lonnet::filelocation($Apache::lonxml::pwd['-1'],$bodytext); |
|
my $cbistyletext=&Apache::lonnet::getfile($location); |
|
|
|
%$style = (%$style,&Apache::style::styleparser($target,$cbistyletext)); |
|
if ( defined($$style{'physnet'}) ) { |
|
&Apache::lonxml::newparser($parser,\$$style{'physnet'}); |
|
} |
|
return ""; |
|
} |
|
|
|
sub end_physnet { |
|
} |
|
|
|
|
1; |
1; |
__END__ |
__END__ |