From: Mike G. v. a. <we...@ma...> - 2009-07-18 03:08:53
|
Log Message: ----------- Aded effectivePermissionLevel to the PG environment -- the permission level of the effectiveUser, the user to which the question has been assigned. Changed the printing of the path to files in beginproblem() so that it is shown if the effectivePermissionLevel is higher than the "PRINT_FILE_NAMES_PERMISSION_LEVEL" value. This responds to user requests that make it easier for an instructor to print hardcopy for the student. Modified Files: -------------- webwork2/lib/WeBWorK: PG.pm webwork2/lib/WeBWorK/ContentGenerator: Problem.pm Revision Data ------------- Index: PG.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/PG.pm,v retrieving revision 1.75 retrieving revision 1.76 diff -Llib/WeBWorK/PG.pm -Llib/WeBWorK/PG.pm -u -r1.75 -r1.76 --- lib/WeBWorK/PG.pm +++ lib/WeBWorK/PG.pm @@ -118,7 +118,9 @@ $envir{studentLogin} = $user->user_id; $envir{studentName} = $user->first_name . " " . $user->last_name; $envir{studentID} = $user->student_id; - $envir{permissionLevel} = $options->{permissionLevel}; + $envir{permissionLevel} = $options->{permissionLevel}; # permission level of actual user + $envir{effectivePermissionLevel} = $options->{effectivePermissionLevel}; # permission level of user assigned to this question + # Answer Information # REMOVED: refSubmittedAnswers Index: Problem.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm,v retrieving revision 1.217 retrieving revision 1.218 diff -Llib/WeBWorK/ContentGenerator/Problem.pm -Llib/WeBWorK/ContentGenerator/Problem.pm -u -r1.217 -r1.218 --- lib/WeBWorK/ContentGenerator/Problem.pm +++ lib/WeBWorK/ContentGenerator/Problem.pm @@ -610,6 +610,7 @@ refreshMath2img => $will{showHints} || $will{showSolutions}, processAnswers => 1, permissionLevel => $db->getPermissionLevel($userName)->permission, + effectivePermissionLevel => $db->getPermissionLevel($effectiveUserName)->permission, }, ); |