Forum archive 2000-2006

Jeff Denny - Error on first problem of each set

Jeff Denny - Error on first problem of each set

by Arnold Pizer -
Number of replies: 0
inactiveTopicError on first problem of each set topic started 8/18/2005; 10:55:45 AM
last post 8/24/2005; 8:42:35 AM
userJeff Denny - Error on first problem of each set  blueArrow
8/18/2005; 10:55:45 AM (reads: 672, responses: 6)
In our new installation of WW 2.1, all of our students are receiving the following error when they submit an answer on problem #1 of each set. Does anyone have an idea of how to address this?

putUserProblem: user problem not found (perhaps you meant to use addUserProblem?) at /opt/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm line 812

<| Post or View Comments |>


userJeff Denny - Re: Error on first problem of each set  blueArrow
8/18/2005; 10:57:57 AM (reads: 751, responses: 0)
More info on this problem...

After the first problem is attempted, the problem is deleted from the set for that student. And, the following error is produced

WeBWorK Warnings

WeBWorK has encountered warnings while processing your request. If this occured when viewing a problem, it was likely caused by an error or ambiguity in that problem. Otherwise, it may indicate a problem with the WeBWorK system itself. If you are a student, report these warnings to your professor to have them corrected. If you are a professor, please consult the warning output below for more information. Warning messages

* Argument "" isn't numeric in addition (+) at /opt/webwork2/lib/WeBWorK/ContentGenerator/ProblemSet.pm line 359.

<| Post or View Comments |>


userJohn Jones - Re: Error on first problem of each set  blueArrow
8/18/2005; 12:26:47 PM (reads: 753, responses: 0)
What is line 359 of /opt/webwork2/lib/WeBWorK/ContentGenerator/ProblemSet.pm? My copy of that file may be different from yours.

John

<| Post or View Comments |>


userJeff Denny - Re: Error on first problem of each set  blueArrow
8/18/2005; 2:11:58 PM (reads: 726, responses: 0)
Sorry for not pasting that in. Line 359 is below.

my $attempts = $problem->num_correct + $problem->num_incorrect;

<| Post or View Comments |>


userMichael Gage - Re: Error on first problem of each set  blueArrow
8/18/2005; 4:12:13 PM (reads: 776, responses: 0)
I'm not sure what went wrong here initially, but I was able to fix it for this problem by deleting problem 1 from set0 and then adding problem 1 back in using the library browser.

The downside is that every student has to problem 1 of set 0 over again, but since it is set 0 that is not too bad. This is a GDBM database which we are no longer using at Rochester, but there haven't been any recent changes to the GDBM database support so I'm hoping this is a one time setup glitch that won't appear again. Stay tuned.

-- Mike

<| Post or View Comments |>


userJohn Jones - Re: Error on first problem of each set  blueArrow
8/18/2005; 9:05:35 PM (reads: 730, responses: 0)
Ultimately, I expect that this is related to the "feature" of perl that 0, an empty string, and an undefined value are hard to distinguish. The two values from the right side of your line 359 should be 0 the first time someone attempts a problem. If it the variable contained the empty string instead, then it would generate the error message you quoted. I haven't looked at GDBM related code, but I know we hit this in sql related code.

John

<| Post or View Comments |>


userJeff Denny - Re: Error on first problem of each set  blueArrow
8/24/2005; 8:42:35 AM (reads: 680, responses: 0)
We have decided to switch to SQL, and things seem to be running smoothly. Apparently, there was a significant error in the GDBM database that occurred when the database was created for each course. This caused a cascade of other errors.

<| Post or View Comments |>