WeBWorK Main Forum

Webwork warning: uninitialized value $checkAnswers; only in student view

Webwork warning: uninitialized value $checkAnswers; only in student view

by Alan Ableson -
Number of replies: 4
Hi there,

I have a previously stable Webwork 2.5 installation that now displaying a new problem.

Everytime a student enters a solution and presses "Check Answer", the answer is correctly classified as correct or incorrect, but the following warning appears:

Warning messages

  • Use of uninitialized value $checkAnswers in list assignment at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm line 664.
  • Odd number of elements in hash assignment at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm line 664.

This is a new problem, and the warning appears on all questions (so it isn't due to a typo in the problem's Perl code).

- When "Acting as" from an admin account, there is no warning.

- Any student answering any question at all gets this warning, even well-validated ones taken directly from the OPL.

Any ideas or thoughts about what could be causing this would be welcome.

[The last major system level thing I did between now and the last known working state was batch uploading .rep and other files into a new /opt/webwork/courses/[new course] directories. I was pretty sure I got the permissions set correctly on the new courses, but this error appears for both students in the old courses and the new courses.]

Thanks,

Alan

---

Alan Ableson

Queen's University, Kingston, Ontario




In reply to Alan Ableson

Re: Webwork warning: uninitialized value $checkAnswers; only in student view

by Hedley Pinsent -
I will venture a quick guess.

2.5 has been around awhile - buildup of temporary filed??

There is "tmp" associated with webwork
and the system "tmp"

hp
In reply to Hedley Pinsent

Re: Webwork warning: uninitialized value $checkAnswers; only in student view

by Alan Ableson -
Thanks for the thought Hedley. Unfortunately /tmp was empty and /opt/webwork/webwork2/tmp was mostly empty (and clearing it didn't change the behaviour). Any other thoughts or suggestions are welcome!

Alan
In reply to Alan Ableson

Re: Webwork warning: uninitialized value $checkAnswers; only in student view

by Arnold Pizer -
Hi,

First I would check whether any WeBWorK system files have been updated or changed recently (e.g. ls -lt will list the most recently changed files first). If none of the WeBWorK system files have changed, check whether Perl or some other part of the OS has changed. At least that might narrow down what may be going on.

Arnie
In reply to Alan Ableson

Re: Webwork warning: uninitialized value $checkAnswers; only in student view

by Danny Glin -
It looks like there is something wrong with determining whether to show the "Check Answers" button.  One thought is that this might be related to permissions.  Did you change any permissions either at the system level or the course level?

Since the "Check Answers" button only appears for students when they can no longer submit answers, have you checked both an open set where the student has attempts remaining, and a set with no remaining attempts, or one where the due date has passed?