Univention Bugzilla – Bug 49953
Make exam folder for students immutable
Last modified: 2019-11-14 17:57:07 CET
As a teacher I want the class work folder not to be moved or renamed by pupils so that the class work mode can correctly collect the folders. Further requirements: - The subfolders must be editable. Acceptance criteria: 1 Assuming that I am writing a class test as a student, it should not be possible for me to rename or move the class test folder.
Implemented in oschwieg/4.4/49953 The proposed behavior is now: Upon starting an exam the i-bit (immutable file attribute) is set on the $EXAM_USER_HOME/Klassenarbeiten folder. This makes the folder immutable for all users (including root). It cannot be removed or renamed. Also its direct children cannot be changed (since it would mutate the folder itself) which means the actual exam folder cannot be mutated and no additional files/folders can be placed inside of it. When finishing an exam the immutable bit is removed from the folder after collecting the results to not interfere with other functionalities like removing/archiving the exam users home etc. Please evaluate if the proposed solution is sufficient and in case reopen for merge and build.
Unsetting the bit now on exam creation to allow subsequent exams with the same users at the same time to create exam folder
reopen: * Please move datadir_*_immutable() method(s) to u.m.c.m.distribution.util.Project. * Proposing different API: add public methods datadir_set_immutable() and datadir_unset_immutable() that call private _set_datadir_immutable(flag). * Please use chflags(stat.UF_IMMUTABLE) instead of subprocess(chattr). OK: Jankins didn't complain today OK: my manual tests: single and two concurrent exams can be created, files are editable, directory and parent dir cannot be removed or renamed, inside exam-dir files can be created, edited, deleted
As discussed the function stays in its current location. A consolidation of all exam specific changes to projects in its own class would be desired and will be discussed in the team. The function was renamed to better describe its dual purpose Package: ucs-school-umc-exam Version: 9.0.1-14A~4.4.0.201908091031 Branch: ucs_4.4-0 Scope: ucs-school-4.4
OK: code change OK: tests OK: advisory
UCS@school 4.4 v4 has been released. https://docs.software-univention.de/changelog-ucsschool-4.4v4-de.html If this error occurs again, please clone this bug.