version 1.57, 2006/02/20 23:52:20
|
version 1.60, 2008/11/24 18:55:01
|
Line 78 sub evaluate {
|
Line 78 sub evaluate {
|
my $result = ''; |
my $result = ''; |
$@=''; |
$@=''; |
$Apache::run::timeout=0; |
$Apache::run::timeout=0; |
$main::SIG{'ALRM'} = sub { |
local $main::SIG{'ALRM'} = sub { |
$Apache::run::timeout=1; |
$Apache::run::timeout=1; |
die("timeout"); |
die("timeout"); |
}; |
}; |
Line 116 sub run {
|
Line 116 sub run {
|
my @result; |
my @result; |
$@=''; |
$@=''; |
$Apache::run::timeout=0; |
$Apache::run::timeout=0; |
$main::SIG{'ALRM'} = sub { |
local $main::SIG{'ALRM'} = sub { |
$Apache::run::timeout=1; |
$Apache::run::timeout=1; |
die("timeout"); |
die("timeout"); |
}; |
}; |
Line 135 sub run {
|
Line 135 sub run {
|
} |
} |
my $errormsg='<pre>'.&HTML::Entities::encode($error,'<>&"').' '. |
my $errormsg='<pre>'.&HTML::Entities::encode($error,'<>&"').' '. |
&HTML::Entities::encode($innererror,'<>&"'). |
&HTML::Entities::encode($innererror,'<>&"'). |
'</pre> occured while running <pre>'; |
'</pre> occurred while running <pre>'; |
$code=&HTML::Entities::encode($code,'<>&"'); |
$code=&HTML::Entities::encode($code,'<>&"'); |
if ($innererror=~/line (\d+)/) { |
if ($innererror=~/line (\d+)/) { |
my $linenumber=$1; |
my $linenumber=$1; |
Line 191 sub dump {
|
Line 191 sub dump {
|
|
|
1; |
1; |
__END__; |
__END__; |
|
|
|
=pod |
|
|
|
=head1 NAME |
|
|
|
Apache::run.pm |
|
|
|
=head1 SYNOPSIS |
|
|
|
Used to prevent poorly written problems from |
|
causing lingering after effects |
|
|
|
This is part of the LearningOnline Network with CAPA project |
|
described at http://www.lon-capa.org. |
|
|
|
|
|
=head1 NOTABLE SUBROUTINES |
|
|
|
=over |
|
|
|
=item run(), dump(), evaluate() |
|
|
|
=back |
|
|
|
=cut |
|
|