version 1.108, 2004/02/11 15:10:05
|
version 1.112, 2004/04/15 20:24:34
|
Line 118 sub start_script {
|
Line 118 sub start_script {
|
($ENV{'form.answer_output_mode'} ne 'tex') && |
($ENV{'form.answer_output_mode'} ne 'tex') && |
($Apache::lonhomework::viewgrades == 'F')) { |
($Apache::lonhomework::viewgrades == 'F')) { |
$Apache::lonxml::evaluate--; |
$Apache::lonxml::evaluate--; |
$result.="<script type=\"text/javascript\"> function LONCAPA_scriptvars_$Apache::lonxml::curdepth() {newWindow=open('','new_W','width=500,height=500,scrollbars=1,resizable=yes');newWindow.document.open('text/html','replace');newWindow.document.writeln('<html><head><title>Script Vars</title></head><body bgcolor=\"#FFFFFF\"><pre>"; |
my (undef,undef,$udom,$uname)=&Apache::lonxml::whichuser(); |
|
$result.="<script type=\"text/javascript\"> function LONCAPA_scriptvars_".$uname."_".$udom."_"."$Apache::lonxml::curdepth() {newWindow=open('','new_W','width=500,height=500,scrollbars=1,resizable=yes');newWindow.document.open('text/html','replace');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; |
$listing=~s/\n/\\n/g; |
$listing=~s/\n/\\n/g; |
$listing=~s/\r/\\r/g; |
$listing=~s/\r/\\r/g; |
$result.=$listing; |
$result.=$listing; |
$result.= "</pre></body></html>');newWindow.document.close();}</script><a href=\"javascript:LONCAPA_scriptvars_$Apache::lonxml::curdepth();void(0);\">Script Vars</a><br />"; |
$result.= "</pre></body></html>');newWindow.document.close();}</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" ) { |
#&Apache::run::run($bodytext,$safeeval); |
#&Apache::run::run($bodytext,$safeeval); |
Line 136 sub start_script {
|
Line 137 sub start_script {
|
my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser); |
my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser); |
} |
} |
} else { |
} else { |
if ($target ne "meta") { |
|
$result = $token->[4]; |
|
my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser); |
my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser); |
$result.=$bodytext; |
if ($target ne "meta") { |
} |
$result = $token->[4]; |
|
$result.=$bodytext; |
|
} |
} |
} |
return $result; |
return $result; |
} |
} |
Line 182 sub start_display {
|
Line 183 sub start_display {
|
} |
} |
$Apache::lonxml::post_evaluate=0; |
$Apache::lonxml::post_evaluate=0; |
} elsif ($target eq "edit" ) { |
} elsif ($target eq "edit" ) { |
my $bodytext=&Apache::lonxml::get_all_text_unblanced("/display",$parser); |
my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/display",$parser); |
#$result = |
#$result = |
# "<br /> <$token->[1]> output: <br />$bodytext<br />Source:<br />"; |
# "<br /> <$token->[1]> output: <br />$bodytext<br />Source:<br />"; |
#$result.=&Apache::edit::editfield($token->[1],$bodytext,'',40,1); |
#$result.=&Apache::edit::editfield($token->[1],$bodytext,'',40,1); |
Line 481 sub end_comment {
|
Line 482 sub end_comment {
|
|
|
sub xmlparse { |
sub xmlparse { |
my ($string) = @_; |
my ($string) = @_; |
# &Apache::lonxml::debug("Got $string"); |
&Apache::lonxml::debug("xmlparse recursion starting with $string"); |
|
if ($string eq '&xmlparse') { return '&xmlparse'; } |
my ($target,$token,$tagstack,$parstack,$oldparser,$safeeval,$style)= |
my ($target,$token,$tagstack,$parstack,$oldparser,$safeeval,$style)= |
@Apache::scripttag::parser_env; |
@Apache::scripttag::parser_env; |
my @parser; |
my @parser; |
Line 489 sub xmlparse {
|
Line 491 sub xmlparse {
|
my $result=&Apache::lonxml::inner_xmlparse($target,$tagstack, |
my $result=&Apache::lonxml::inner_xmlparse($target,$tagstack, |
$parstack,\@parser, |
$parstack,\@parser, |
$safeeval,$style); |
$safeeval,$style); |
|
&Apache::lonxml::debug("xmlparse recursion ending with $result"); |
return $result; |
return $result; |
} |
} |
|
|