Log Message:
-----------
ProblemSetDetail: show ip restriction fields if set isn't assigned to
any users.
Modified Files:
--------------
webwork2/lib/WeBWorK/ContentGenerator/Instructor:
ProblemSetDetail.pm
Revision Data
-------------
Index: ProblemSetDetail.pm
===================================================================
RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm,v
retrieving revision 1.74
retrieving revision 1.75
diff -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -u -r1.74 -r1.75
--- lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm
+++ lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm
@@ -617,7 +617,8 @@
$numLocations = @locations;
# we don't show ip selector fields if we're editing a set version
- if ( defined( $userRecord ) && ! $userRecord->can("version_id") ) {
+ if ( ! defined( $userRecord ) ||
+ ( defined( $userRecord ) && ! $userRecord->can("version_id") ) ) {
if ( ( ! $forUsers && $globalRecord->restrict_ip &&
$globalRecord->restrict_ip ne 'No' ) ||
( $forUsers && $userRecord->restrict_ip ne 'No' ) ) {
|