version 1.51, 2001/09/18 02:21:13
|
version 1.53, 2001/10/05 22:29:10
|
Line 33 sub start_script {
|
Line 33 sub start_script {
|
$result=$token->[4].&Apache::edit::modifiedfield(); |
$result=$token->[4].&Apache::edit::modifiedfield(); |
} elsif ( $target eq "web" || $target eq "grade" || $target eq 'answer') { |
} elsif ( $target eq "web" || $target eq "grade" || $target eq 'answer') { |
&Apache::run::run($bodytext,$safeeval); |
&Apache::run::run($bodytext,$safeeval); |
|
if (($ENV{'request.state'} eq 'construct') && ($target eq 'web')) { |
|
$Apache::lonxml::evaluate--; |
|
$result.="<a href=\"javascript:newWindow=open(\'\',\'new_W\',\'width=500,height=200,scrollbars=1\');newWindow.document.open(\'text/html\',\'replace\');newWindow.document.writeln(\'<html><head><title>newwindow</title></head><body bgcolor="#FFFFFF"><pre>"; |
|
my $listing= &Apache::run::dump($target,$safeeval); |
|
$listing =~ s/\n/\\n/g; |
|
$result.=$listing; |
|
$result.= "</pre></body></html>\');newWindow.document.close();void(0);\">Script Vars</a>"; |
|
} |
} elsif ($target eq "edit" ) { |
} elsif ($target eq "edit" ) { |
#&Apache::run::run($bodytext,$safeeval); |
#&Apache::run::run($bodytext,$safeeval); |
#$result="<br /> <$token->[1]> output: <br />$bodytext<br />Source:<br />"; |
#$result="<br /> <$token->[1]> output: <br />$bodytext<br />Source:<br />"; |
Line 51 sub end_script {
|
Line 59 sub end_script {
|
my $type = &Apache::lonxml::get_param('type',$parstack,$safeeval); |
my $type = &Apache::lonxml::get_param('type',$parstack,$safeeval); |
my $result=''; |
my $result=''; |
#other script blocks need to survive |
#other script blocks need to survive |
if ($type ne "loncapa/perl") { return $token->[2]; } |
if ($type ne "loncapa/perl") { |
if ($target eq 'edit' ) { return &Apache::edit::end_table(); } |
return $token->[2]; |
|
} elsif ($target eq 'edit' ) { |
|
return &Apache::edit::end_table(); |
|
} elsif (($ENV{'request.state'} eq 'construct') && ($target eq 'web')) { |
|
$Apache::lonxml::evaluate++; |
|
} |
return ''; |
return ''; |
} |
} |
|
|
Line 255 sub end_storetc {
|
Line 268 sub end_storetc {
|
my $result; |
my $result; |
my $output=&Apache::lonxml::endredirection; |
my $output=&Apache::lonxml::endredirection; |
$output =~ s/\"/\"\;/g; |
$output =~ s/\"/\"\;/g; |
$result = "{\bf $output.}}\write\tcfile{\protect\tcpc{ $output.}{\the\value{relpage}}}"; |
$result = '{\bf '.$output.'.}}\write\tcfile{\protect\tcpc{ '.$output.'.}{\the\value{relpage}}}'; |
return $result; |
return $result; |
} |
} |
|
|
|
|