WeBWorK Main Forum

allowing students to generate hardcopy with solutions

allowing students to generate hardcopy with solutions

by Hans Johnston -
Number of replies: 8
Hello All,

For some reason my students are unable to view the
answers to problem sets even after the due date and answers
available dates have passed. As the instructor with 'professor'
level permissions I have no problem doing so.

The generated hardcopy only shows the original problems.

I've already looked over the pertinent "Course Configurations"
fields, and find nothing that prevents them form generating
corrected solutions.

Any help would be appreciated!

Thanks, Hans
In reply to Hans Johnston

Re: allowing students to generate hardcopy with solutions

by Gavin LaRose -
Hi Hans,

What version of/when did you install WeBWorK? There was a bug fix that got put into the CVS for showing answers in Hardcopy sometime at the beginning of August. A good first check would probably be to update your version of Hardcopy.pm (in ../webwork2/lib/WeBWorK/ContentGenerator) or your WeBWorK installation. That may take care of the problem.

This may work if you're on rel-2-4-patches; if you're running another WeBWorK version it may be necessary to try something else (e.g., just grabbing the Hardcopy.pm file from http://cvs.webwork.rochester.edu/viewcvs.cgi/*checkout*/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm?rev=1.94.2.2.2.3
and trying that in place of your existing version).

Gavin
In reply to Gavin LaRose

Re: allowing students to generate hardcopy with solutions

by Miao Ye -

Hi, Gavin,

[1] I have the same problem. We running PG 2.4.5/webwork 2.4.5.

[2] I run the following command, but still have the problem.

webwork2/lib/WeBWorK/ContentGenerator# cvs update -r rel-2-4-patches Hardcopy.pm

Your help would be appreciated!

--Miao

In reply to Miao Ye

Re: allowing students to generate hardcopy with solutions

by Gavin LaRose -
Hi Miao,

I'm going to apologize in advance for asking this, but did you restart apache after updating the module?

Thanks,
Gavin
In reply to Gavin LaRose

Re: allowing students to generate hardcopy with solutions

by Miao Ye -

Hi, Gavin,

Thank you for reply. Actually, yesterday, I got some error:

[1] During updating:

root@newton:/opt/webwork/webwork2/lib/WeBWorK/ContentGenerator# cvs update -r rel-2-4-patches Hardcopy.pm
file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm,v
retrieving revision 1.94.2.2.2.1
retrieving revision 1.94.2.2.2.3
Merging differences between 1.94.2.2.2.1 and 1.94.2.2.2.3 into Hardcopy.pm
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in Hardcopy.pm
C Hardcopy.pm
root@newton:/opt/webwork/webwork2/lib/WeBWorK/ContentGenerator# ls -l Hardcopy.pm*
-rwxr--r-- 1 root root 41367 2008-11-10 16:57 Hardcopy.pm
-rw-r--r-- 1 root root 41078 2008-08-22 00:45 Hardcopy.pm.bak

[2] During restart apache:

root@newton:/usr/sbin# ./apache2ctl graceful
Syntax error on line 33 of /etc/apache2/conf.d/webwork.conf:
Can't modify numeric lt (<) in scalar assignment at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 26, near "one or"\nsyntax error at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 29, near "="\n"use" not allowed in expression at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 31, at end of line\nBEGIN not safe after errors--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 32.\nCompilation failed in require at (eval 810) line 3.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK.pm line 85.\nCompilation failed in require at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\n\t(in cleanup) Can't modify numeric lt (<) in scalar assignment at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 26, near "one or"\nsyntax error at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 29, near "="\n"use" not allowed in expression at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 31, at end of line\nBEGIN not safe after errors--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 32.\nCompilation failed in require at (eval 810) line 3.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK.pm line 85.\nCompilation failed in require at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\nCompilation failed in require at /etc/apache2/conf.d/webwork.conf line 50.\n

seems that Hardcopy.pm does not work for us.

--Miao

In reply to Miao Ye

Re: allowing students to generate hardcopy with solutions

by Michael Gage -
cvs update: conflicts found in Hardcopy.pm
C Hardcopy.pm

The C indicates a conflict in the file between a local modification and changes made in the file located in the CVS repository. If you edit the file Hardcopy.pm you will see lines that look like:

<<<<<<<<<<<<<<<

code modifications that you mad

=========================

code modifications made in the CVS repository

>>>>>>>>>>>>>>>>>>>>>>>>>

You need to edit these by hand, selecting either the local modifications or
those from the CVS repository (but not both).


If you don't want to keep any of your local modifications you can also delete
the file Hardcopy.pm and then do

cvs update

to get the newest version.


The presence of lines containing <<<<<<<<<< are what are causing the
compile errors that you experienced.
In reply to Gavin LaRose

Re: allowing students to generate hardcopy with solutions

by Miao Ye -

Hi, Gavin,

Thank you for reply. Actually, yesterday, I got some error:

[1] During updating:

root@newton:/opt/webwork/webwork2/lib/WeBWorK/ContentGenerator# cvs update -r rel-2-4-patches Hardcopy.pm
file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm,v
retrieving revision 1.94.2.2.2.1
retrieving revision 1.94.2.2.2.3
Merging differences between 1.94.2.2.2.1 and 1.94.2.2.2.3 into Hardcopy.pm
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in Hardcopy.pm
C Hardcopy.pm
root@newton:/opt/webwork/webwork2/lib/WeBWorK/ContentGenerator# ls -l Hardcopy.pm*
-rwxr--r-- 1 root root 41367 2008-11-10 16:57 Hardcopy.pm
-rw-r--r-- 1 root root 41078 2008-08-22 00:45 Hardcopy.pm.bak

[2] During restart apache:

root@newton:/usr/sbin# ./apache2ctl graceful
Syntax error on line 33 of /etc/apache2/conf.d/webwork.conf:
Can't modify numeric lt (<) in scalar assignment at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 26, near "one or"\nsyntax error at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 29, near "="\n"use" not allowed in expression at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 31, at end of line\nBEGIN not safe after errors--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 32.\nCompilation failed in require at (eval 810) line 3.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK.pm line 85.\nCompilation failed in require at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\n\t(in cleanup) Can't modify numeric lt (<) in scalar assignment at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 26, near "one or"\nsyntax error at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 29, near "="\n"use" not allowed in expression at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 31, at end of line\nBEGIN not safe after errors--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm line 32.\nCompilation failed in require at (eval 810) line 3.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK.pm line 85.\nCompilation failed in require at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\nCompilation failed in require at /etc/apache2/conf.d/webwork.conf line 50.\n

seems that Hardcopy.pm does not work for us.

--Miao

In reply to Gavin LaRose

Re: allowing students to generate hardcopy with solutions

by Hal Sadofsky -

We've been having this problem too.

After searching the archives and following Gavin's suggestion to update Hardcopy.pm yesterday (replacing 1.94.2.2.2.1 with 1.94.2.2.2.3) we still had the problem. After I read the rest of the thread this morning and restarted Apache, the problem seems to have gone away.

So thanks Gavin, both for making the initial suggestion and for giving a kick to those of us who need to be reminded to do the obvious!

Hal

In reply to Gavin LaRose

Re: allowing students to generate hardcopy with solutions

by Miao Ye -

Hi, Gavin,

The Hardcopy.pm linked in your post works. Thank you.

I think I did something wrong.

Best,

--Miao