version 1.123, 2005/02/24 01:21:50
|
version 1.125, 2005/02/27 17:26:09
|
Line 31 package Apache::scripttag;
|
Line 31 package Apache::scripttag;
|
use strict; |
use strict; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::style; |
use Apache::style; |
use AlgParser; |
|
|
|
#Globals |
#Globals |
# this used to pass around the standard callsub arguments to a tag func |
# this used to pass around the standard callsub arguments to a tag func |
Line 120 sub start_script {
|
Line 119 sub start_script {
|
my (undef,undef,$udom,$uname)=&Apache::lonxml::whichuser(); |
my (undef,undef,$udom,$uname)=&Apache::lonxml::whichuser(); |
my $windowopen=&Apache::lonhtmlcommon::javascript_docopen(); |
my $windowopen=&Apache::lonhtmlcommon::javascript_docopen(); |
$result.="<script type=\"text/javascript\"> |
$result.="<script type=\"text/javascript\"> |
// <!-- |
// <![CDATA[ |
function LONCAPA_scriptvars_".$uname."_".$udom."_"."$Apache::lonxml::curdepth() {newWindow=open('','new_W','width=500,height=500,scrollbars=1,resizable=yes');newWindow.$windowopen;newWindow.document.writeln('<html><head><title>Script Vars</title></head><body bgcolor=\"#FFFFFF\"><pre>"; |
function LONCAPA_scriptvars_".$uname."_".$udom."_"."$Apache::lonxml::curdepth() {newWindow=open('','new_W','width=500,height=500,scrollbars=1,resizable=yes');newWindow.$windowopen;newWindow.document.writeln('<html><head><title>Script Vars</title></head><body bgcolor=\"#FFFFFF\"><pre>"; |
my $listing=&Apache::run::dump($target,$safeeval); |
my $listing=&Apache::run::dump($target,$safeeval); |
$listing=~s/\'/\\\'/g; |
$listing=~s/\'/\\\'/g; |
Line 128 sub start_script {
|
Line 127 sub start_script {
|
$listing=~s/\r/\\r/g; |
$listing=~s/\r/\\r/g; |
$result.=$listing; |
$result.=$listing; |
$result.= "</pre></body></html>');newWindow.document.close();} |
$result.= "</pre></body></html>');newWindow.document.close();} |
// --> |
// ]]> |
</script><a href=\"javascript:LONCAPA_scriptvars_".$uname."_".$udom."_$Apache::lonxml::curdepth();void(0);\">Script Vars</a><br />"; |
</script><a href=\"javascript:LONCAPA_scriptvars_".$uname."_".$udom."_$Apache::lonxml::curdepth();void(0);\">Script Vars</a><br />"; |
} |
} |
} elsif ($target eq "edit" ) { |
} elsif ($target eq "edit" ) { |
Line 564 sub start_algebra {
|
Line 563 sub start_algebra {
|
my $inside = &Apache::lonxml::get_all_text_unbalanced("/algebra",$parser); |
my $inside = &Apache::lonxml::get_all_text_unbalanced("/algebra",$parser); |
$inside = &Apache::run::evaluate($inside,$safeeval,$$parstack[-1]); |
$inside = &Apache::run::evaluate($inside,$safeeval,$$parstack[-1]); |
if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze') { |
if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze') { |
$result=&Apache::lontexconvert::algebra($inside,$target); |
my $style=&Apache::lonxml::get_param('style',$parstack,$safeeval); |
|
$result=&Apache::lontexconvert::algebra($inside,$target,$style); |
} |
} |
$Apache::lonxml::post_evaluate=0; |
$Apache::lonxml::post_evaluate=0; |
} |
} |