version 1.78, 2002/10/14 20:47:11
|
version 1.82, 2002/11/13 23:15:40
|
Line 43 BEGIN {
|
Line 43 BEGIN {
|
&Apache::lonxml::register('Apache::scripttag', |
&Apache::lonxml::register('Apache::scripttag', |
('script','scriptlib','parserlib','import', |
('script','scriptlib','parserlib','import', |
'window','display','storetc','physnet', |
'window','display','storetc','physnet', |
'standalone','comment')); |
'standalone','comment', |
|
'LONCAPA_INTERNAL_TURN_STYLE_ON')); |
|
} |
|
|
|
sub start_LONCAPA_INTERNAL_TURN_STYLE_ON { |
|
$Apache::lonxml::usestyle=1; |
|
return ('','no'); |
|
} |
|
|
|
sub end_LONCAPA_INTERNAL_TURN_STYLE_ON { |
|
return ('','no'); |
} |
} |
|
|
sub start_script { |
sub start_script { |
Line 59 sub start_script {
|
Line 69 sub start_script {
|
} elsif ( $target eq 'web' || $target eq 'tex' || |
} elsif ( $target eq 'web' || $target eq 'tex' || |
$target eq 'grade' || $target eq 'answer' || |
$target eq 'grade' || $target eq 'answer' || |
$target eq 'analyze' ) { |
$target eq 'analyze' ) { |
&Apache::run::run($bodytext,$safeeval); |
if (!$Apache::lonxml::default_homework_loaded) { |
if (($target eq 'answer') && ($Apache::lonhomework::viewgrades == 'F')) { |
&Apache::lonxml::default_homework_load($safeeval); |
$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>"; |
&Apache::run::run($bodytext,$safeeval); |
my $listing= &HTML::Entities::encode(&Apache::run::dump($target,$safeeval)); |
if (($target eq 'answer') && ($Apache::lonhomework::viewgrades == 'F')) { |
|
$Apache::lonxml::evaluate--; |
$result.=$listing; |
$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>"; |
$result.= "</pre></body></html>\');newWindow.document.close();void(0);\">Script Vars</a><br />"; |
my $listing= &HTML::Entities::encode(&Apache::run::dump($target,$safeeval)); |
} |
|
|
$result.=$listing; |
|
$result.= "</pre></body></html>\');newWindow.document.close();void(0);\">Script Vars</a><br />"; |
|
} |
} 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 111 sub start_display {
|
Line 124 sub start_display {
|
} elsif ( $target eq 'web' || $target eq 'tex' || |
} elsif ( $target eq 'web' || $target eq 'tex' || |
$target eq 'grade' || $target eq 'answer' || |
$target eq 'grade' || $target eq 'answer' || |
$target eq 'analyze') { |
$target eq 'analyze') { |
$result=&Apache::run::run($bodytext,$safeeval); |
if (!$Apache::lonxml::default_homework_loaded) { |
if ($target eq 'grade' || $target eq 'answer' || |
&Apache::lonxml::default_homework_load($safeeval); |
$target eq 'analyze') { |
} |
$result=''; # grade should produce no output |
$result=&Apache::run::run($bodytext,$safeeval); |
} |
if ($target eq 'grade' || $target eq 'answer' || |
|
$target eq 'analyze') { |
|
$result=''; # grade should produce no output |
|
} |
} elsif ($target eq "edit" ) { |
} elsif ($target eq "edit" ) { |
#$result = |
#$result = |
# "<br /> <$token->[1]> output: <br />$bodytext<br />Source:<br />"; |
# "<br /> <$token->[1]> output: <br />$bodytext<br />Source:<br />"; |