WeBWorK Main Forum

Argument isn't numeric in localtime

Argument isn't numeric in localtime

by Darwyn Cook -
Number of replies: 10
I am getting a couple of errors after putting a gateway exam in a course. There are two errors:
1) Argument "" isn't numeric in numeric ge (>=) at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/ProblemSets.pm line 399.
2)
Argument "" isn't numeric in localtime at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/ProblemSets.pm line 478.

The errors are only present in the two courses that have these gateways, so I have to believe they are causing the problem. FWIW the gateways use questions that are drawn from a group of questions.

Webwork and the gateways are working fine, so no real issue there.

We are running WW on Centos 4.8 with a cvs update two weeks ago using

rel-2-4-patches webwork2 (is that 2.4.7 or do you need -dP?).

P.S. Looking at a similar post from Rob Owen in 2007 I checked the dates for the sets, they all look to be correctly formatted.
In reply to Darwyn Cook

Re: Argument isn't numeric in localtime

by Gavin LaRose -
Hi Darwyn,

The error message you're getting appears to arise from the formatting of the dates when a gateway test was created and is due that occurs in the ProblemSets list. This is an odd error (I think), because if the test was created it should have a creation and due date. How was (were) the gateway assignments (and the assignments, including gateway tests) that are on the offending ProblemSets pages created?

Thanks,
Gavin
In reply to Gavin LaRose

Re: Argument isn't numeric in localtime

by Darwyn Cook -
Well here is a longwinded answer to an easy question. The exams were originally created in a separate Gateway course over a year ago. As I remember the course gateway was created as a gateway and then the problem sets were added (although that could have happened in the opposite order).

I hadn't noticed this before, but in the Gateway course there is only error, the line 399 error. The gateways are used to create printed exams, so I never bothered with the errors. This year I decided to let the students practice online, so I imported the Gateways into my differential equations course.

The set def file for the integrals gateway I imported:

openDate = 10/25/2008 at 12:04am EDT
dueDate = 12/10/2009 at 11:04pm EST
answerDate = 12/17/2009 at 11:04pm EST
paperHeaderFile = setHeaderidentities.pg
screenHeaderFile =
assignmentType = gateway
attemptsPerVersion =
timeInterval =
versionsPerInterval =
versionTimeLimit =
problemRandOrder = 0
problemsPerPage =
hideScore = N
hideWork = N
capTimeLimit = 0
problemList =
alfredLibrary/gateway/calcII/elementary/prob1.pg, 1,
alfredLibrary/gateway/calcII/elementary/prob2.pg, 1,
alfredLibrary/gateway/calcII/elementary/prob3.pg, 1,
alfredLibrary/gateway/calcII/elementary/prob4.pg, 1,
alfredLibrary/gateway/calcII/elementary/prob5.pg, 1,
alfredLibrary/gateway/calcII/elementary/prob6.pg, 1,
alfredLibrary/gateway/calcII/elementary/prob7.pg, 1,
alfredLibrary/gateway/calcII/elementary/prob8.pg, 1,
alfredLibrary/gateway/calcII/elementary/prob9.pg, 1,
group:substitution_integrals, 1,

There are two gateways, one for derivatives and fne or integrals, here is the dates in the homework sets editor:


Welcome_to_WeBWorKedit.gif 1 58/58 Yes 01/19/2010 at 08:20am EST 01/20/2010 at 11:59pm EST 01/21/2010 at 05:10pm EST

Introduction_to_Differential_Equationsedit.gif 7 58/58 Yes 01/20/2010 at 08:20am EST 01/25/2010 at 11:59pm EST 05/31/2010 at 10:33pm EDT

Initial_Value_Problemsedit.gif 8 58/58 Yes 01/22/2010 at 07:20am EST 01/27/2010 at 10:59pm EST 01/29/2010 at 10:59pm EST

Introduction_to_Modelingedit.gif 10 58/58 Yes 01/27/2010 at 09:33pm EST 02/01/2010 at 10:59pm EST 02/03/2010 at 10:59pm EST

Direction_Fieldsedit.gif 11 58/58 Yes 01/29/2010 at 07:20am EST 02/03/2010 at 10:59pm EST 05/31/2010 at 10:33pm EDT

Integrals_Gatewayedit.gif 10 58/58 Yes 01/20/2010 at 08:24am EST 05/10/2010 at 11:59pm EDT 05/11/2010 at 11:59pm EDT

Derivatives_Gatewayedit.gif 16 58/58 Yes 01/20/2010 at 08:24am EST 05/10/2010 at 11:59pm EDT 05/11/2010 at 11:59pm EDT

Separable_Equationsedit.gif 13 58/58 Yes 05/17/2010 at 10:33pm EDT 05/24/2010 at 10:33pm EDT 05/31/2010 at 10:33pm EDT

Linear_Equationsedit.gif 9 58/58 Yes 05/17/2010 at 10:33pm EDT 05/24/2010 at 10:33pm EDT 05/31/2010 at 10:33pm EDT

Linear_Modelsedit.gif 9 58/58 Yes 05/17/2010 at 10:33pm EDT 05/24/2010 at 10:33pm EDT 05/31/2010 at 10:33pm EDT

Non_Linear_Modelsedit.gif 7 58/58 Yes 05/17/2010 at 10:33pm EDT 05/24/2010 at 10:33pm EDT 05/31/2010 at 10:33pm EDT

Eulers_Methodedit.gif 10 58/58 Yes 05/17/2010 at 10:33pm EDT 05/24/2010 at 10:33pm EDT 05/31/2010 at 10:33pm EDT

quotient_rule_derivativesedit.gif 8 0/58 No 10/10/2008 at 11:14pm EDT 06/17/2010 at 10:59pm EDT 06/18/2010 at 10:59pm EDT

chain_rule_derivativesedit.gif 10 0/58 No 10/10/2008 at 11:28pm EDT 06/17/2010 at 10:59pm EDT 06/18/2010 at 10:59pm EDT

miscellaneous_derivativesedit.gif 4 0/58 No 10/10/2008 at 11:50pm EDT 06/17/2010 at 10:59pm EDT 06/18/2010 at 10:59pm EDT

product_rule_derivativesedit.gif 8 0/58 No 01/25/2010 at 09:59pm EST 06/17/2010 at 10:59pm EDT 06/18/2010 at 10:59pm EDT

substitution_integralsedit.gif 4 0/58 No 10/24/2008 at 09:13pm EDT 10/31/2010 at 09:13pm EDT 11/03/2010 at 09:13pm EDT




In reply to Darwyn Cook

Re: Argument isn't numeric in localtime

by Gavin LaRose -
Hi Darwyn,

Thanks. What do the data associated with the actual set that a student has taken look like? e.g., if you select the student and "view/edit all sets for one user"? I'm curious what shows up in the 'due date' and 'answer date' field for the versions of the sets that the student(s) take (and which are on the ProblemSets page that is generating this error message). Do you have access to the mysql server? If so, I'd also be interested in seeing what the value for the version_creation_time column in the course_set_user is for that set.

The error message(s) say that these field are blank, which I think shouldn't be the case if the version was created by taking the test. If the test version were created in some other way it's possible that they could be blank---but I'm not thinking of how that could be the case.

Gavin
In reply to Gavin LaRose

Re: Argument isn't numeric in localtime

by Darwyn Cook -
Well you convinced me that the problem was specific to these sets, so I have found one solution: I just made new sets with the same problems and they don't have these errors.

If you want I can still look in the mysql server.
In reply to Gavin LaRose

Re: Argument isn't numeric in localtime

by Darwyn Cook -
I was a bit premature with my optimism. Checking again, remaking the problem set did not help. I tried making a different gateway in another course with just one problem in it, same issue, so it looks like a site issue.
Here is one of the pieces of info you requested, I will have to get the mysql info tomorrow.

Sets assigned to Administrator (admin)
Assigned Edit set for admin Dates
Derivatives_Gateway
Open: 01/20/2010 at 08:24am EST
Due : 05/10/2010 at 11:59pm EDT
Ans : 05/11/2010 at 11:59pm EDT

test 1
Open: 01/20/2010 at 08:24am EST
Due : 05/10/2010 at 11:59pm EDT
Ans : 05/11/2010 at 11:59pm EDT

test 2
Open: 01/20/2010 at 08:24am EST
Due : 05/10/2010 at 11:59pm EDT
Ans : 05/11/2010 at 11:59pm EDT

test 3
Open: 01/20/2010 at 08:24am EST
Due : 05/10/2010 at 11:59pm EDT
Ans : 05/11/2010 at 11:59pm EDT

test 4
Open: 01/20/2010 at 08:24am EST
Due : 05/10/2010 at 11:59pm EDT
Ans : 05/11/2010 at 11:59pm EDT

Integrals_Gateway
Open: 01/20/2010 at 08:24am EST
Due : 05/10/2010 at 11:59pm EDT
Ans : 05/11/2010 at 11:59pm EDT

test 1
Open: 01/20/2010 at 08:24am EST
Due : 05/10/2010 at 11:59pm EDT
Ans : 05/11/2010 at 11:59pm EDT

test 2
Open: 01/20/2010 at 08:24am EST
Due : 05/10/2010 at 11:59pm EDT
Ans : 05/11/2010 at 11:59pm EDT

test 3
Open: 01/20/2010 at 08:24am EST
Due : 05/10/2010 at 11:59pm EDT
Ans : 05/11/2010 at 11:59pm EDT

test 4
Open: 01/20/2010 at 08:24am EST
Due : 05/10/2010 at 11:59pm EDT
Ans : 05/11/2010 at 11:59pm EDT

test 5
Open: 01/20/2010 at 08:24am EST
Due : 05/10/2010 at 11:59pm EDT
Ans : 05/11/2010 at 11:59pm EDT

In reply to Darwyn Cook

Re: Argument isn't numeric in localtime

by Gavin LaRose -
Hi Darwyn,

Thanks, that's helpful. The first thing is that it seems to clear up that the due and answer dates are correctly set (as we'd hope).

I think this means that the line 399 error is probably looking at the attempts_per_version value for the set. Is there any chance that is empty? (On the set editing page, that's the "Number of Graded Submissions per Test" field.)

The line 478 error has to do with the stored time when the set version was created. I can't see why that would be empty; when the set version is created it should be read from the system time. If you can see if the version_creation_time in the database is blank for one of these sets that would probably be useful.

Gavin
In reply to Gavin LaRose

Re: Argument isn't numeric in localtime

by Darwyn Cook -
Gavin,
You nailed the 399 error, the number of graded submissions per test was blank, changing that to 100 cleared those errors.

You may have noticed that I have studiously avoided your requests for information from the database, I hope to have that tomorrow.

FWIW, the line 478 errors are in the course I imported the Gateways into, they do not appear in the course they were exported from.
In reply to Darwyn Cook

Re: Argument isn't numeric in localtime

by Gavin LaRose -
Hi Darwyn,

One more thought/question: the line 478 error is in the course you imported gateways to. Did you import the gateway set (that is, the template set that is assigned to all users), or the set version (that is, the test that shows up as having been taken by the user)? If the latter, the mystery is probably cleared up---if you export a set version, it won't export a large amount of the version data (it never occurred to me that would be desirable), and the version creation time is one of those fields that would therefore be blank when the set was built in the new course, which would result in the error you're seeing.

And if that's the case, it suggests that I might want to make the set exporting function a little more robust with respect to gateway data.

Thanks,
Gavin
In reply to Gavin LaRose

Re: Argument isn't numeric in localtime

by Darwyn Cook -
In the homework sets editor I used the export radio dialog button to export the integrals and derivatives gateway along with the sets that I used to make up the groups for some of the questions.
I used the file manager to download those set .def files to my computer, and then used file manager in the other course to upload them. Then I used the import set feature in homework sets editor to import them.

I don't think it is possible to do that with a single test that someone has taken.
In reply to Darwyn Cook

Re: Argument isn't numeric in localtime

by Gavin LaRose -
In case anyone else is following this thread...

Darwyn and I had a series of off-list emails that we think have resulted in the resolution of the problem. It appears that the problem resulted from some fields in the set definition for the gateway set being undefined. In particular, the fields timeInterval and versionsPerInterval (and there may be another) were being imported from a set definition file that left values for those parameters empty. Filling in those values appears to have resolved the problem.

Gavin