WeBWorK Main Forum

No correct answers in student hardcopy

No correct answers in student hardcopy

by Dennis Keeler -
Number of replies: 3
Hello. A student has informed me that the hardcopy generator will not print correct answers, even after the "show answers" date. When I login as myself and use the professor hardcopy generator, it works fine. But I've confirmed with a test account that a student can't print the correct answers. I'm not sure about hints and solutions, as these particular problems did not have any.

I'm running 2.4.5, updated with rel-2-4-patches on Wednesday last week. Following the Ubuntu 8.04 instructions (now updated and corrected... unlucky timing for me), I had done a fresh install from rel-2-4-dev, not realizing rel-2-4-patches was newer. There were many errors on rel-2-4-dev, so I did more reading and upgraded. Maybe this problem is a holdover from rel-2-4-dev.

I made sure to integrate all changes in the conf files. I can't find a setting in global.conf related to printing answers after the due date. Thanks. -Dennis
In reply to Dennis Keeler

Re: No correct answers in student hardcopy

by Michael Gage -
Hi Dennis,

So far I haven't been able to duplicate this behavior. My version of Hardcopy.pm
is 1.94.2..2.2.1

cvs status Hardcopy.pm

typed in the directory containing Harcopy.pm will give you the working version.

I created a student, set the answer date for the setOrientation to be a couple of weeks ago and printed out hardcopy for setOrientation. Checking the "show answers" checkbox produced a pdf which displayed the correct answers.

I can't guarantee that the check boxes for "hints" and "solutions" work correctly -- there aren't any examples of those in setOrientation and these aspects aren't yet as widely used.

Can you check the procedure I followed above and suggest anything I could try that woul reproduce the bug?

-- Mike

In reply to Michael Gage

Re: No correct answers in student hardcopy

by Dennis Keeler -
That's the same version of Hardcopy.pm that I have. I'm not sure what else could be done to reproduce the error. To make sure we're clear, did you logout and then login as the student? I can print the correct answers for a student while logged into my own account.

I thought perhaps the hardcopy generator wasn't seeing the date correctly. I tried a HW set that had answers available a year ago. I also tried setting show_correct_answers_before_answer_date to undef, so my account would be more like a student's. But when I did this, the hardcopy generator would correctly print correct answers for sets with answers available, and would not print correct answers for sets with future answer dates. So it seems to me that the hardcopy generator is seeing the date.

I'm not seeing any error messages and the temp working directory is being deleted after successful generation. The system is just acting like the current date is before the answers available date.

I'm happy to try any other suggestions. Thanks. -Dennis
In reply to Dennis Keeler

Re: No correct answers in student hardcopy

by Arnold Pizer -
Hi Dennis,

I just tried this on two new installations (Fedora 9 and Ubuntu 8.04) using the same version of hardcopy.pm that you are using. The installations were done with version rel-2-4-patches following the instructions at http://webwork.maa.org/wiki/Installation_Manual_for_2.4#Installation_instructions_for_specific_operating_systems .
First I changed the due and answer dates of set 0 from 2009 to 2008 and then I logged in as a regular student (jsmith) and downloaded a hard copy with answers. And the answers were there.

I have no idea what the problem might be. I assume you haven't changed any of the default permissionLevels in global.conf and double checked that the answer date has actually passed for the student in question. The fact that you can get the answers when acting as a student seems to indicate that there is either a problem with how dates are being processed or with permission levels. It's probably something very simple but I can't think of what it would be.

Arnie