Forum archive 2000-2006

Šarūnas Burdulis - Prevent hardcopy generation

Šarūnas Burdulis - Prevent hardcopy generation

by Arnold Pizer -
Number of replies: 0
inactiveTopicPrevent hardcopy generation topic started 9/19/2005; 1:05:07 PM
last post 9/23/2005; 7:40:26 PM
userarūnas Burdulis - Prevent hardcopy generation  blueArrow
9/19/2005; 1:05:07 PM (reads: 572, responses: 5)

Is there a configuration option to restrict the availability of hardcopy generation option to certain permission levels? Or to prevent hardcopy generation altogether?

Preventing hardcopy generation is needed for one of the courses here. I have temporarily "resolved" this by adding some explanatory text and then end{document} to hardcopyPreamble.tex.


<| Post or View Comments |>

userfuchsa@v... - Re: Prevent hardcopy generation  blueArrow
9/22/2005; 11:34:31 PM (reads: 640, responses: 0)

you can always suppress the links on the level of the source code...

in file '$webwork_dir/lib/WeBWork/ContentGenerator/', find the line

'print CGI::p(CGI::submit("hardcopy", "Download Hardcopy for Selected Set$pl"));'

and prepend it with the pound character, '#'--which introduces perl commentary.

identically, suppress the line

'print CGI::p(CGI::a({href=>$hardcopyURL}, "Download a hardcopy of this problem set."));'

in file '$webwork_dir/lib/WeBWork/ContentGenerator/'...

i can't offhand think of any other instance of link to hardcopy...

hope this helps...


<| Post or View Comments |>

userfuchsa@v... - Re: Prevent hardcopy generation  blueArrow
9/22/2005; 11:48:03 PM (reads: 642, responses: 0)
or rather if you don't want to to block the facility site-wide, you can always execute conditionally like so:

'print CGI::p(CGI::a({href=>$hardcopyURL}, "Download a hardcopy of this problem set.")) if $ce->{courseName} ne 'name_of_your_course';


<| Post or View Comments |>

userMichael Gage - Re: Prevent hardcopy generation  blueArrow
9/23/2005; 11:56:08 AM (reads: 630, responses: 0)
The clean way to handle this would be to add to the permission list in global.conf
	##### Behavior of the Hardcopy Processor #####

download_hardcopy_multiuser => $ta,
download_hardcopy_multiset => $ta,
download_hardcopy_format_tex => $ta,
Add download_hardcopy =>$prof,

and then modify the code as you describe above or better, just put in a check at the top of to see if the user has permission to download hardcopy.

I'll add this as a feature request to the bug list. for now I think you will have to use one of the tricks above.

I'm curious about the circumstances that make it undesirable to allow hardcopy download?


<| Post or View Comments |>

userarūnas Burdulis - Re: Prevent hardcopy generation  blueArrow
9/23/2005; 4:30:25 PM (reads: 636, responses: 0)
Thanks for the suggestion. I'll stick to my end{document} "fix" for now though.

Below are comments from the professor, who needed this feature.

/qoute/ I am experimenting with webowrk to create an online version of our placement test system. Ideally, students would register to take a particualr exam with me, I'd create accounts and give them a time frame for the exam. Placement tests are, in general, multiple choice, and need to be consistent from year to year making it necessary, at least for the first few years, to make uniform exams. Like the SATs/AP exam, we will likely include a few random new problems to each exam to create a track record for the exam do as to eventually create fully randomized exams. In the short term, however, I'd like to restrict the printing of the exams as much as possible to prevent the potential wide distribution of the exams. Scott /end qoute/

<| Post or View Comments |>

userSam Hathaway - Re: Prevent hardcopy generation  blueArrow
9/23/2005; 7:40:26 PM (reads: 644, responses: 0)
If you're tracking the CVS HEAD, take a look at the latest version of It is a major rewrite, so be prepared for bugs at first, but it adds support for the permission download_hardcopy_format_pdf (initially set to $guest) to complement download_hardcopy_format_tex. To disable hardcopy for guests and students, make sure that both download_hardcopy_format_pdf and download_hardcopy_format_tex are set to a permission level higher than $student.

If you update, make sure to also update and global.conf.dist. Also note that this version currently requires the CPAN module String::ShellQuote.

See also:
CVS commit messages:
Bugzilla item:

<| Post or View Comments |>