35
35
You should customize the ToS notice at :file:`/var/lib/ivle/notices/tos.html`.
37
... delete a user from IVLE?
38
----------------------------
40
This is usually a bad idea since it requires all the references to that user
41
to be removed from IVLE. This may have unintended consequences particularly
42
with groups or projects but might be required in installations where an
43
existing login conflict with a new login (typically encountered when usernames
46
The steps to completely remove a user would be:
48
1. Disable the users account
49
2. Unmount the users jailmount directory (typically
50
:file:`/var/lib/ivle/jailmounts/LOGIN`)
51
3. Backup the user's files (typically :file:`/var/lib/ivle/jails/LOGIN`) and
52
remove this directory.
53
4. Backup the user's repository (typically
54
:file:`/var/lib/ivle/svn/repositories/users/LOGIN` on the subversion
55
server) and remove this directory.
56
5. Make a backup of the IVLE database (``sudo -u postgres pg_dump ivle >
58
6. Either change the users login (``UPDATE login SET login='NEWLOGIN' WHERE
59
login='LOGIN'``) or remove all references to this login in the database
61
The following lines of SQL should remove all traces of a user from the
65
DELETE FROM exercise_save USING login WHERE
66
exercise_save.loginid = login.loginid AND login.login = 'LOGIN';
67
DELETE FROM exercise_attempt USING login WHERE
68
exercise_attempt.loginid = login.loginid AND login.login = 'LOGIN';
69
DELETE FROM project_mark USING login WHERE marker = login.loginid AND
70
login.login = 'LOGIN';
71
DELETE FROM project_submission USING login WHERE
72
submitter = login.loginid AND login.login = 'LOGIN';
73
DELETE FROM project_extension USING login WHERE
74
approver = login.loginid AND login.login = 'LOGIN';
75
DELETE FROM assessed USING login WHERE
76
assessed.loginid = login.loginid AND login.login = 'LOGIN';
77
DELETE FROM enrolment USING login WHERE
78
enrolment.loginid = login.loginid AND login.login = 'LOGIN';
79
DELETE FROM group_member USING login WHERE
80
group_member.loginid = login.loginid AND login.login = 'LOGIN';
81
DELETE FROM group_invitation USING login WHERE
82
(group_invitation.loginid = login.loginid OR
83
inviter = login.loginid) AND login.login = 'LOGIN';
84
DELETE FROM project_group USING login WHERE createdby = login.loginid AND
85
login.login = 'LOGIN';
86
DELETE FROM login WHERE login='LOGIN';