CodeGrade / bottlenose

CS assignment / grade mangement system
GNU Affero General Public License v3.0
38 stars 21 forks source link

Modify upload paths to permit archiving entire courses #169

Open blerner opened 4 years ago

blerner commented 4 years ago

We've structured the private/uploads/production/ directory to be organized by course, then assignment, then submissions. We may need to add one more branch, private/uploads/production/ and `private/uploads/production/archived/, such that entire courses can be moved to the archived directory, and that entire directory could be mounted from another filesystem so as to save on disk space in the primary local filesystem.

Doing this requires updating Upload#upload_dir, Upload.upload_path_for and Upload.full_path_for, and probably the FilesController as well. These would need to check whether the directory exists in the active area, or else check if it exists in the archived area. If neither exists, assume it's active.