Skip to content

Remove PRINT_FILE_NAMES_FOR and PRINT_FILE_NAMES_PERMISSION_LEVEL#2952

Open
dlglin wants to merge 2 commits intoopenwebwork:WeBWorK-2.21from
dlglin:remove-print-file-names-for
Open

Remove PRINT_FILE_NAMES_FOR and PRINT_FILE_NAMES_PERMISSION_LEVEL#2952
dlglin wants to merge 2 commits intoopenwebwork:WeBWorK-2.21from
dlglin:remove-print-file-names-for

Conversation

@dlglin
Copy link
Copy Markdown
Member

@dlglin dlglin commented Apr 17, 2026

This removes the special PG environment variables PRINT_FILE_NAMES_FOR and PRINT_FILE_NAMES_PERMISSION_LEVEL.

In defaults.config the value of PRINT_FILE_NAMES_PERMISSION_LEVEL is set to the value of the print_path_to_problem permission, so now that permission is just checked directly.

I don't see the use of PRINT_FILE_NAMES_FOR. When a new course is created it is hardcoded to add all users with permission level of 'professor' or higher to the array, but those users will already be able to view file names via the print_path_to_problem permission.

The motivation behind this was to remove the one remaining setting that is added to course.conf when a new course is created. Now that file contains no settings by default.

Copy link
Copy Markdown
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this pull request there are no longer any valid $courseOptions. The only thing this has was used for was for writing the course.conf file, and the only thing that was left in it was the PRINT_FILE_NAMES_FOR option. So it should be removed from the code entirely. Both in the CourseManagement.pm file and in the CourseAdmin.pm file.

Furthermore, the writeCourseConf method in CourseManagement.pm doesn't need any arguments anymore other than the file handle to write to.

I have already done this, and will put a pull request in to this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants