Bug 46719 - (4.3) Exam mode should not remove exam users home directory
(4.3) Exam mode should not remove exam users home directory
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - Exam mode
UCS@school 4.1 R2
Other Linux
: P5 normal (vote)
: UCS@school 4.3 v2
Assigned To: Sönke Schwardt-Krummrich
Jürn Brodersen
:
Depends on:
Blocks: 39427 44157 46720
  Show dependency treegraph
 
Reported: 2018-03-21 16:48 CET by Sönke Schwardt-Krummrich
Modified: 2018-04-06 22:02 CEST (History)
0 users

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2018-03-21 16:48:48 CET
In a first step, the removal of the exam user's home directory shall be avoided by setting a UCR variable. The listener module will then move the exam user's home directory to the default backup directory.


+++ This bug was initially created as a clone of Bug #39427 +++

When stopping the exam mode, the home directory of the exam users is removed directly after collecting the exam files. There has been at least one case, where the students have saved their results not within the exam folder but in the root of their exam user home directory. The teacher stopped the exam and the results were lost.

Possible solution:
- do not remove exam user's home directory via UMC module
- after removing the user, the listener module remove-old-homedirs.py moves the 
  exam home directory to the backup directory (default: /home/backup)
- add an adjustable cronjob that checks the backup directory for "outdated" exam 
  home directories and removes them ("outdated" means e.g. "older than 8 days").

Possible Extension:
- the cron job should also check the other backed up home directories and remove 
  outdated directories (with different expiration date).
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2018-03-22 12:01:55 CET
As a first step, the exam module was modified in such a way that optionally
(controllable via a UCR variable) the home directory of the exam users is
*not* deleted at the end of the class work.

If deletion is disabled, the exam mode will behave as follows:
If the user has logged off correctly from the Windows client, the results
are copied from the home directory to the results directory of the teacher.
After the deletion of the home directory has been skipped, the exam user
is deleted in LDAP.

By default, the listener module remove-old-homedirs.py is now active, which
automatically moves the home directories of deleted users to /home/backup/
and appends a Unix timestamp to the directory name:

/home/gsmitte/schueler/exam-homes/exam-edo.kaiser.20180310-032742
→
/home/backup/exam-edo.kaiser.20180310-032742.1521713195

The new boolean UCR variable is:
ucsschool/exam/user/homedir/autoremove

By default, this variable is set to "yes" by the postinst script.

Please note:
If the user logs off from the Windows client after the exam mode has
ended and there is still a running connection between Samba and the Windows
client, the Samba process recreates the home directory of the Exam user and
saves the Windows profile there. This is usually done after the listener
module has already moved the actual home directory to /home/backup/. In this
case, both directories (/home/backup/$EXAMUID.$EXAMTIMESTAMP.$BACKUPTIMESTAMP
and /home/$OU/schueler/exam-homes/$EXAMUID.$EXAMTIMESTAMP) have to be checked,
if, for example, the results you are looking for are not in the results
directory of the teacher.

Package: ucs-school-umc-exam
Version: 8.0.1-4A~4.3.0.201803221143
Branch: ucs_4.3-0
Scope: ucs-school-4.3

52ffe400 Bug #46710, #46719: Merge branch 'sschwardt/46710/43/file_upload' into 4.3
13136b99 Bug #46719: add advisory
6b73fe8c Bug #46719: add changelog entry
62aaebec Bug #46719: add UCR variable to disable the automatic removal of the home directories of exam users
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2018-03-23 10:41:31 CET
6dbda3e0 Bug #46719: update advisory
7842cf79 Bug #46719: add changelog entry
ba86e26a Bug #46719: fix UCR variable description

Package: ucs-school-umc-exam
Version: 8.0.1-5A~4.3.0.201803231039
Comment 3 Jürn Brodersen univentionstaff 2018-03-23 11:29:17 CET
Ok
What I tested:
ucsschool/exam/user/homedir/autoremove=yes -> home directories are removed and NOT moved into /home/backups -> OK
ucsschool/exam/user/homedir/autoremove=no -> home directories are removed and moved into /home/backups -> OK

YAML -> OK

-> Verified
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2018-04-06 22:02:27 CEST
UCS@school 4.3 v2 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.3v2-de.html

If this error occurs again, please clone this bug.