WeBWorK Main Forum

assignment type spurious warnings

assignment type spurious warnings

by Zak Zarychta -
Number of replies: 1
I have recently composed a problem set from three other problem sets in order to compose a proctored gateway test.

Firstly I exported all the questions from the relevant set to a .def file I then imported these into another problem set whereupon I deleted all but the questions that i wanted in the proctored gateway test. I then changed the assignment type in the homework sets editor and performed a run through of the test to check timing etc

I decided that there were too many questions in the proctored gateway test. For ease of editing i again switched the assignment type back to problem set but now on each question i get the following warning messages

Warning messages

  • Argument "" isn't numeric in numeric eq (==) at /opt/webwork/webwork25/lib/WeBWorK/ContentGenerator/Problem.pm line 142.
  • Argument "" isn't numeric in numeric eq (==) at /opt/webwork/webwork25/lib/WeBWorK/ContentGenerator/Problem.pm line 164.
  • Argument "" isn't numeric in numeric eq (==) at /opt/webwork/webwork25/lib/WeBWorK/ContentGenerator/Problem.pm line 142.
  • Argument "" isn't numeric in subtraction (-) at /opt/webwork/webwork25/lib/WeBWorK/ContentGenerator/Problem.pm lin
Any idea what might be causing this?

Zak

In reply to Zak Zarychta

Re: assignment type spurious warnings

by Gavin LaRose -
Hi Zak,

Glancing at the Problem.pm code it looks as if the value for maxAttempts is being set to "" instead of -1 in the course of the assignment type changes, which means that the tests on maxAttempts spit a warning.

The problem is that maxAttempts is a hidden value for gateway/quiz assignments, which is then not getting retained properly. The fix is to correct how it's retained. I can see what has to happen to correct the bug, but it will take me a little bit to figure out how to get the information we need about the set to make it change. If anyone else with the background or interest in hacking the ProblemSetDetail ContentGenerator wants to look at it I can follow up with details.

Gavin