cvs update -rrel-2-4-patches webwork (not sure if that is 2.4.7 or 2.4.5) on Centos 4.8
After having used problemRandomize successfully in one problem I tried to install it in PGcourse.pl using the lines:
loadMacros("problemRandomize.pl");
ProblemRandomize(when=>"always",XonlyAfterDue=>1,style=>"Input");
ProblemRandomize(when=>"always",XonlyAfterDue=>0,style=>"Input")
if $studentLogin eq "admin";
# This gives the admin the ability to generate a new problem anytime?
When I went to test it by trying a problem (as admin) the server slowed way down to the point that I had to reboot it (I have noticed before that sometimes the one problem I have working will take a long time to load). Checking the logs here are some of the messages I had:
[Thu Jan 21 12:00:44 2010] [warn] [client 149.84.152.70] [/webwork2/math271cook/Initial_Value_Problems/4/] Deep recursion on subroutine "problemRandomize::grader" at (eval 970) line 356.\n, referer: http://webwork.alfred.edu/webwork2/math
271cook/Initial_Value_Problems/3/
[Thu Jan 21 12:01:47 2010] [warn] [client 149.84.152.70] [/webwork2/math271cook/Initial_Value_Problems/4/] Timeout after processing this problem for 60 seconds. Check for infinite loops in problem source.\n, referer: http://webwork.alfred
.edu/webwork2/math271cook/Initial_Value_Problems/3/
[Thu Jan 21 12:03:03 2010] [warn] [client 149.84.53.65] [/webwork2/math271cook/Introduction_to_Differential_Equations/3/] Timeout after processing this problem for 60 seconds. Check for infinite loops in problem source., referer: http://w
ebwork.alfred.edu/webwork2/math271cook/Introduction_to_Differential_Equations/3/
[Thu Jan 21 12:03:04 2010] [warn] [client 149.84.53.65] [/webwork2/math271cook/Introduction_to_Differential_Equations/3/] Failed to evaluate module Parser: Timeout after processing this problem for 60 seconds. Check for infinite loops in
problem source.\nCompilation failed in require at /opt/webwork/pg/lib/Parser.pm line 795, <DATA> line 365.\nBEGIN failed--compilation aborted at /opt/webwork/pg/lib/Parser.pm line 795, <DATA> line 365.\nCompilation failed in require at (e
val 203) line 1, <DATA> line 365., referer: http://webwork.alfred.edu/webwork2/math271cook/Introduction_to_Differential_Equations/3/
[Thu Jan 21 12:03:05 2010] [warn] [client 149.84.53.65] [/webwork2/math271cook/Introduction_to_Differential_Equations/3/] Failed to evaluate module Value: Timeout after processing this problem for 60 seconds. Check for infinite loops in p
roblem source.\nCompilation failed in require at /opt/webwork/pg/lib/Parser.pm line 795, <DATA> line 365.\nBEGIN failed--compilation aborted at /opt/webwork/pg/lib/Parser.pm line 795, <DATA> line 365.\nCompilation failed in require at (ev
al 203) line 1, <DATA> line 365., referer: http://webwork.alfred.edu/webwork2/math271cook/Introduction_to_Differential_Equations/3/
[Thu Jan 21 12:03:05 2010] [warn] [client 149.84.53.65] [/webwork2/math271cook/Introduction_to_Differential_Equations/3/] Failed to evaluate module Parser::Legacy: Can't call method "copy" on an undefined value at /opt/webwork/pg/lib/Pars
er/Legacy/LimitedNumeric.pm line 81, <DATA> line 365.\nCompilation failed in require at /opt/webwork/pg/lib/Parser/Legacy.pm line 6, <DATA> line 365.\nBEGIN failed--compilation aborted at /opt/webwork/pg/lib/Parser/Legacy.pm line 6, <DATA
> line 365.\nCompilation failed in require at (eval 204) line 1, <DATA> line 365., referer: http://webwork.alfred.edu/webwork2/math271cook/Introduction_to_Differential_Equations/3/
Timeout after processing this problem for 60 seconds. Check for infinite loops in problem source.
The code for problem Initial_Value_problems 4 referred to in the first error:
##DESCRIPTION
## Give students a two parameter solution of a DE, ask them to solve the IVP
##ENDDESCRIPTION
##KEYWORDS('ivp' 'initial' 'value' 'problem')
## DBsubject('Calculus')
## DBchapter('Differential Equations')
## DBsection('Introduction to Differential Equations')
## Date('12/16/2009')
## Author('Darwyn Cook')
## Institution('Alfred University')
## TitleText1('Differential Equations: with Boundary Value Problems')
## EditionText1('6')
## AuthorText1('Zill')
## Section1('1.2')
## Problem1('')
########################################################################
DOCUMENT();
loadMacros(
"PGstandard.pl", # Standard macros for PG language
"MathObjects.pl",
"PGcourse.pl", # Customization file for the course
);
# Print problem number and point value (weight) for the problem
TEXT(beginproblem());
# Show which answers are correct and which ones are incorrect
$showPartialCorrectAnswers = 1;
Context()->variables->add(y=>"Real");
##############################################################
#
# Setup
#
#
$y0 = Compute(random(1,10));
$dy0 = Compute(random(1,10));
$soln = Formula("$dy0*sin(x)+$y0*cos(x)");
##############################################################
#
# Text
#
#
Context()->texStrings;
BEGIN_TEXT
The differential equation
$BR
\[y^{\prime\prime}+y = 0\]
has one of the following two parameter families as its general solution
$BR
\[
\begin{aligned}
y&=c_1e^x &y&=c_2e^{-x}\\
y&=c_1\cos(x) &y&=c_2\sin(x)\\
y&=c_1\tan(x) &y&=c_2\sec(x)\\
y&=c_1 &y&=c_2x\\
\end{aligned}
\]
$BR
Find the solution such that \(y(0) = $y0\) and \(y^\prime(0)=$dy0\): \{$soln->ans_rule(20)\}
END_TEXT
Context()->normalStrings;
##############################################################
#
# Answers
#
#
ANS($soln->cmp);
ENDDOCUMENT();