version 1.57, 2001/11/12 20:27:28
|
version 1.60, 2001/12/10 16:42:20
|
Line 1
|
Line 1
|
# The LearningOnline Network with CAPA |
# The LearningOnline Network with CAPA |
# <script> definiton |
# <script> definiton |
|
# |
|
# $Id$ |
|
# |
|
# Copyright Michigan State University Board of Trustees |
|
# |
|
# This file is part of the LearningOnline Network with CAPA (LON-CAPA). |
|
# |
|
# LON-CAPA is free software; you can redistribute it and/or modify |
|
# it under the terms of the GNU General Public License as published by |
|
# the Free Software Foundation; either version 2 of the License, or |
|
# (at your option) any later version. |
|
# |
|
# LON-CAPA is distributed in the hope that it will be useful, |
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
# GNU General Public License for more details. |
|
# |
|
# You should have received a copy of the GNU General Public License |
|
# along with LON-CAPA; if not, write to the Free Software |
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
# |
|
# /home/httpd/html/adm/gpl.txt |
|
# |
|
# http://www.lon-capa.org/ |
|
# |
# 2/21 Guy |
# 2/21 Guy |
# 8/20 Gerd Kortemeyer |
# 8/20 Gerd Kortemeyer |
|
|
Line 34 sub start_script {
|
Line 59 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') { |
&Apache::run::run($bodytext,$safeeval); |
&Apache::run::run($bodytext,$safeeval); |
if (($ENV{'request.state'} eq 'construct') && ($target eq 'answer')) { |
if (($target eq 'answer') && ($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= &Apache::run::dump($target,$safeeval); |
my $listing= &Apache::run::dump($target,$safeeval); |
$listing =~ s/\n/\\n/g; |
$listing =~ s/\n/\\n/g; |
|
$listing =~ s/\"/"/g; |
|
$listing =~ s/\'/’/g; |
|
$listing =~ s/</</g; |
|
$listing =~ s/>/>/g; |
|
$listing =~ s/&/&/g; |
$result.=$listing; |
$result.=$listing; |
$result.= "</pre></body></html>\');newWindow.document.close();void(0);\">Script Vars</a><br />"; |
$result.= "</pre></body></html>\');newWindow.document.close();void(0);\">Script Vars</a><br />"; |
} |
} |
Line 293 sub start_physnet {
|
Line 323 sub start_physnet {
|
my $cbistyletext=&Apache::lonnet::getfile($location); |
my $cbistyletext=&Apache::lonnet::getfile($location); |
|
|
%$style = (%$style,&Apache::style::styleparser($target,$cbistyletext)); |
%$style = (%$style,&Apache::style::styleparser($target,$cbistyletext)); |
if ( defined($$style{'physnet'}) ) { |
$$parser['-1']->unget_token($token); |
&Apache::lonxml::newparser($parser,\$$style{'physnet'}); |
# if ( defined($$style{'physnet'}) ) { |
} |
# &Apache::lonxml::newparser($parser,\$$style{'physnet'}); |
|
# } |
return ""; |
return ""; |
} |
} |
|
|