WeBWorK Main Forum

specialPGEnvironmentVars in set header files?

specialPGEnvironmentVars in set header files?

by Andras Balogh -
Number of replies: 4

I would like to suppress showing the problem file paths in hardcopies (for printing exams). 

I thought placing this line in hardcopy header will work, but it does not:
$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_PERMISSION_LEVEL} = undef;

Is it possible to place specialPGEnvironmentVars into set headers?

Alternatively: Is it possible to hide problem file paths only in hardcopy?

Right now I have to keep commenting/uncommenting the  specialPGEnvironmentVars line in course.conf before/after printing exams.



In reply to Andras Balogh

Re: specialPGEnvironmentVars in set header files?

by Alex Jordan -

Try this in course.conf:

$permissionLevels{print_path_to_problem} = "nobody";

In reply to Alex Jordan

Re: specialPGEnvironmentVars in set header files?

by Andras Balogh -

Only this worked for me:

$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_PERMISSION_LEVEL} =$userRoles{nobody};

In reply to Andras Balogh

Re: specialPGEnvironmentVars in set header files?

by Glenn Rice -

You must be using a version of WeBWorK prior to 2.16.  In 2.16 you can just uncheck the "Show Problem Source File" checkbox on the hardcopy page to do this.

In reply to Glenn Rice

Re: specialPGEnvironmentVars in set header files?

by Andras Balogh -

I am using version 2.16 I just did not notice the checkbox.

Thanks!