From: Mike G. v. a. <we...@ma...> - 2008-06-21 17:13:43
|
Log Message: ----------- Pass permissionLevel to the PG question environment allows the question to behave differently if the actual viewer is an instructor. (The effectiveUser is the student for whom the question was constructed -- the user -- is the person viewing the problem which might be the student or it might be an instructor acting as the student The permissionLevel is the one assigned to the "user". 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.73 retrieving revision 1.74 diff -Llib/WeBWorK/PG.pm -Llib/WeBWorK/PG.pm -u -r1.73 -r1.74 --- lib/WeBWorK/PG.pm +++ lib/WeBWorK/PG.pm @@ -118,6 +118,7 @@ $envir{studentLogin} = $user->user_id; $envir{studentName} = $user->first_name . " " . $user->last_name; $envir{studentID} = $user->student_id; + $envir{permissionLevel} = $options->{permissionLevel}; # Answer Information # REMOVED: refSubmittedAnswers Index: Problem.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm,v retrieving revision 1.214 retrieving revision 1.215 diff -Llib/WeBWorK/ContentGenerator/Problem.pm -Llib/WeBWorK/ContentGenerator/Problem.pm -u -r1.214 -r1.215 --- lib/WeBWorK/ContentGenerator/Problem.pm +++ lib/WeBWorK/ContentGenerator/Problem.pm @@ -609,9 +609,10 @@ showSolutions => $will{showSolutions}, refreshMath2img => $will{showHints} || $will{showSolutions}, processAnswers => 1, + permissionLevel => $db->getPermissionLevel($userName)->permission, }, ); - + debug("end pg processing"); ##### fix hint/solution options ##### |