One way to test for a professor is the following:
if $permissionLevel >= $PRINT_FILE_NAMES_PERMISSION_LEVEL;since
$permissionLevel
is the current user's permission level, and PRINT_FILE_NAMES_PERMISSION_LEVEL
is usually at least professor level. You might want to use $effectivePermissionLevel
rather than $permissionLevel
if you want to avoid the re-randomize button when viewing student versions of the problems (so you don't accidentally re-randomize the problem in use by a student).
Davide