version 1.86, 2003/02/24 23:32:32
|
version 1.96, 2003/06/09 15:46:01
|
Line 50 BEGIN {
|
Line 50 BEGIN {
|
|
|
sub start_LONCAPA_INTERNAL_TURN_STYLE_ON { |
sub start_LONCAPA_INTERNAL_TURN_STYLE_ON { |
$Apache::lonxml::usestyle=1; |
$Apache::lonxml::usestyle=1; |
|
$Apache::lonxml::style_values=''; |
return ('','no'); |
return ('','no'); |
} |
} |
|
|
sub end_LONCAPA_INTERNAL_TURN_STYLE_ON { |
sub end_LONCAPA_INTERNAL_TURN_STYLE_ON { |
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
|
my $end=&Apache::lonxml::get_param('end',$parstack,$safeeval); |
|
if (defined($end)) { |
|
&Apache::lonxml::end_tag($tagstack,$parstack,$token); |
|
} |
return ('','no'); |
return ('','no'); |
} |
} |
|
|
Line 89 sub start_script {
|
Line 95 sub start_script {
|
&Apache::lonxml::default_homework_load($safeeval); |
&Apache::lonxml::default_homework_load($safeeval); |
} |
} |
&Apache::run::run($bodytext,$safeeval); |
&Apache::run::run($bodytext,$safeeval); |
if (($target eq 'answer') && ($Apache::lonhomework::viewgrades == 'F')) { |
if (($target eq 'answer') && |
|
($ENV{'form.answer_output_mode'} ne 'tex') && |
|
($Apache::lonhomework::viewgrades == 'F')) { |
$Apache::lonxml::evaluate--; |
$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>"; |
$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= &HTML::Entities::encode(&Apache::run::dump($target,$safeeval)); |
my $listing= &HTML::Entities::encode(&Apache::run::dump($target,$safeeval)); |
Line 274 sub end_window {
|
Line 282 sub end_window {
|
my $result; |
my $result; |
if ($target eq 'web') { |
if ($target eq 'web') { |
my $output=&Apache::lonxml::endredirection; |
my $output=&Apache::lonxml::endredirection; |
|
my $linktext= &Apache::lonxml::get_param('linktext',$parstack,$safeeval); |
|
if (!$linktext) { $linktext='<sup>*</sup>'; } |
|
my $width= &Apache::lonxml::get_param('width',$parstack,$safeeval); |
|
if (!$width) { $width='500'; } |
|
my $height= &Apache::lonxml::get_param('height',$parstack,$safeeval); |
|
if (!$height) { $height='200'; } |
|
$output =~ s/[\n\r]/ /g; |
|
$output =~ s/\'/\\\&\#39\;/g; |
$output =~ s/\"/\"\;/g; |
$output =~ s/\"/\"\;/g; |
$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"> $output </body></html>\');newWindow.document.close();void(0);\"><sup>*</sup></a>"; |
$result = "<a href=\"javascript:newWindow=open(\'\',\'new_W\',\'width=$width,height=$height,scrollbars=1\');newWindow.document.open(\'text/html\',\'replace\');newWindow.document.writeln(\'<html><head><title>newwindow</title></head><body bgcolor="#FFFFFF"> $output </body></html>\');newWindow.document.close();void(0);\">$linktext</a>"; |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
$result = '}'; |
$result = '}'; |
} else { |
} else { |
Line 308 sub start_import {
|
Line 324 sub start_import {
|
my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval); |
my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval); |
if (!$id) { $id=$Apache::lonxml::curdepth; } |
if (!$id) { $id=$Apache::lonxml::curdepth; } |
push(@Apache::inputtags::import,$id); |
push(@Apache::inputtags::import,$id); |
&Apache::lonxml::newparser($parser,\$file,$dir); |
push(@Apache::inputtags::importlist,$id); |
|
|
|
&Apache::lonxml::newparser($parser,\$file,$dir); |
|
|
} elsif ($target eq "edit" ) { |
} elsif ($target eq "edit" ) { |
$result.=&Apache::edit::tag_start($target,$token); |
$result.=&Apache::edit::tag_start($target,$token); |
$result.=&Apache::edit::editline($token->[1],$bodytext,'',40); |
$result.=&Apache::edit::editline($token->[1],$bodytext,'',40); |
Line 427 sub end_comment {
|
Line 446 sub end_comment {
|
|
|
sub xmlparse { |
sub xmlparse { |
my ($string) = @_; |
my ($string) = @_; |
&Apache::lonxml::debug("Got $string"); |
# &Apache::lonxml::debug("Got $string"); |
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; |