I stumbled across an interesting WeBWorK scenario a few days ago that lead to an interesting error (that I'm not sure if I fully understand). First, here's the error:
Error messages
Can't use an undefined value as a HASH reference at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm line 1274.
Call stack
The information below can help locate the source of the problem.
in WeBWorK::ContentGenerator::Problem::output_summary called at line 152 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
in WeBWorK::Template::template called at line 494 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::content called at line 198 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::go called at line 371 of /opt/webwork/webwork2/lib/WeBWorK.pm
Next, the context that generated it: here at Grand Valley State, we have a group of instructors developing a standard WeBWorK curriculum for a few of our math courses. To facilitate this process, I set up a course to be shared amongst these instructors. Each instructor in the course had two user accounts, with professor and student privileges, respectively. Instructors were creating there own homework sets to work on different areas of the curriculum.
What occurred to produce the error: one instructor created a homework set which was not assigned to all the users in the course. Then another instructor came along and attempted to copy/edit problems in the homework set.
What resolved the error: if the set was assigned to all users in the course, the second instructor could manipulate the set without errors as desired (e.g., editing a problem in the set to their pedagogical liking).
My suspicion is this error stems from some permission-like value stored in the WeBWorK DB which is set upon homework set creation/assignment. I'm curious if this situation was intened or if this is an unforeseen consequence of the design (that could cause more future problems). For example, a `team-taught' course would very likely run into this problem.
-Kurt