~azzar1/unity/add-show-desktop-key

1332 by David Coles
Incorporated old faq.txt into new Sphinx docs
1
.. IVLE - Informatics Virtual Learning Environment
2
   Copyright (C) 2007-2009 The University of Melbourne
3
4
.. This program is free software; you can redistribute it and/or modify
5
   it under the terms of the GNU General Public License as published by
6
   the Free Software Foundation; either version 2 of the License, or
7
   (at your option) any later version.
8
9
.. This program is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
   GNU General Public License for more details.
13
14
.. You should have received a copy of the GNU General Public License
15
   along with this program; if not, write to the Free Software
16
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
18
.. _ref-faq:
19
20
**************************
21
Frequently Asked Questions
22
**************************
23
24
This is a list of Frequently Asked Questions for IVLE. It answers questions 
25
about common issues encountered when configuring or running the system.
26
27
.. _ref-faq-how:
1385 by David Coles
Fix references in Documentation
28
1332 by David Coles
Incorporated old faq.txt into new Sphinx docs
29
How can I...
30
============
31
32
... change the Terms of Service notice?
33
---------------------------------------
34
35
You should customize the ToS notice at :file:`/var/lib/ivle/notices/tos.html`.
36
1530 by David Coles
Docs: How to completely remove a user from IVLE (hint, it's a bad idea)
37
... delete a user from IVLE?
38
----------------------------
39
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 
44
are recycled).
45
46
The steps to completely remove a user would be:
47
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 > 
57
   backup.sql``)
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
60
1531 by David Coles
Docs: A second option assigns metadata to another user rather than deleting all rows that have any reference to the user
61
The following lines of SQL should remove all traces of a user ``LOGIN`` from 
62
the database::
1530 by David Coles
Docs: How to completely remove a user from IVLE (hint, it's a bad idea)
63
64
    BEGIN TRANSACTION;
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';
87
    COMMIT;
1332 by David Coles
Incorporated old faq.txt into new Sphinx docs
88
1531 by David Coles
Docs: A second option assigns metadata to another user rather than deleting all rows that have any reference to the user
89
If you do not want to lose group data, a better option may be to reassign the 
90
user ``LOGIN``'s groups to ``NEWLOGIN`` (one possible option would be to 
91
create and use a 'nobody' account)::
92
93
    BEGIN TRANSACTION;
94
    DELETE FROM exercise_save USING login WHERE
95
        exercise_save.loginid = login.loginid AND login.login = 'LOGIN';
96
    DELETE FROM exercise_attempt USING login WHERE
97
        exercise_attempt.loginid = login.loginid AND login.login = 'LOGIN';
98
    UPDATE project_mark SET marker = l2.loginid FROM login AS l1, login AS l2
99
        WHERE marker = l1.loginid AND l1.login = 'LOGIN' AND l2.login = 
100
        'NEWLOGIN'
101
    DELETE FROM project_submission USING login WHERE
102
        submitter = login.loginid AND login.login = 'LOGIN';
103
    UPDATE project_extension SET approver = l2.loginid FROM
104
        login AS l1, login AS l2 WHERE approver = l1.loginid AND
105
        l1.login = 'LOGIN' AND l2.login='NEWLOGIN';
106
    DELETE FROM assessed USING login WHERE
107
        assessed.loginid = login.loginid AND login.login = 'LOGIN';
108
    DELETE FROM enrolment USING login WHERE
109
        enrolment.loginid = login.loginid AND login.login = 'LOGIN';
110
    DELETE FROM group_member USING login WHERE
111
        group_member.loginid = login.loginid AND login.login = 'LOGIN';
112
    DELETE FROM group_invitation USING login WHERE
113
        group_invitation.loginid = login.loginid AND login.login = 'LOGIN';
114
    UPDATE group_invitation SET inviter = l2.loginid FROM
115
        login AS l1, login AS l2 WHERE inviter = l1.loginid AND
116
        l1.login = 'LOGIN' AND l2.login='NEWLOGIN';
117
    UPDATE project_group SET createdby = l2.loginid FROM
118
        login AS l1, login AS l2 WHERE createdby = l1.loginid AND
119
        l1.login = 'LOGIN' AND l2.login = 'NEWLOGIN';
120
    DELETE FROM login WHERE login='LOGIN';
121
    COMMIT;
122
123
1332 by David Coles
Incorporated old faq.txt into new Sphinx docs
124
.. _ref-faq-why:
1385 by David Coles
Fix references in Documentation
125
1332 by David Coles
Incorporated old faq.txt into new Sphinx docs
126
Why does...
127
===========
128
129
... Apache not restart?
130
-----------------------
131
132
Make sure no console processes are lying around (e.g. sudo killall
133
python), then restart with ``sudo /etc/init.d/apache2 restart``.  If the issue
134
persists, try stopping the server and starting it in two separate
135
steps, so you see the errors reported by the start script.
136
137
... IVLE dump me back to the login screen with no error when I try to login?
138
----------------------------------------------------------------------------
139
140
This is usually because IVLE can't save your session information. IVLE saves
141
sessions to a sessions directory on disk. Unfortunately, this is not currently
142
configurable in :file:`./setup.py` config. You need to edit the Apache config 
143
file.
144
145
Look for ``PythonOption mod_python.file_session.database_directory``. Make
146
sure it is set to the place you want. Then, you need to manually make sure
147
that directory exists.
148
149
The default is :file:`/var/lib/ivle/sessions`.
150
1387 by David Coles
FAQs for common error messages
151
1399 by David Coles
Update FAQ to match more informative 'UnsafeJail' error message
152
... ivle-buildjail fail with 'Error: Jail contains world writable path'
153
-----------------------------------------------------------------------
1387 by David Coles
FAQs for common error messages
154
155
When running :program:`ivle-buildjail` you may occasionally see an error 
156
like::
157
1399 by David Coles
Update FAQ to match more informative 'UnsafeJail' error message
158
    Error: Jail contains world writable path: 
159
    '/var/lib/ivle/jails/__base_build__/tmp/.ICE-unix'.
160
    This is a security vulnerability as jail template contents are shared 
161
    between users. Please either make this path world unwriteable or remove it 
162
    from the jail.
1387 by David Coles
FAQs for common error messages
163
164
This means that writable files exist in the Jail template. If left in the jail 
165
then users would be able to edit a file that is shared between all jail 
166
instances. The usual solution is just to remove these file from the jail build 
167
directory and try again.
168
1399 by David Coles
Update FAQ to match more informative 'UnsafeJail' error message
169
At present it is not possible to include world writable files outside a user's 
170
home directory so if this file is deliberately included you will need to 
171
ensure that it is not world writeable.
172
1387 by David Coles
FAQs for common error messages
173
174
... the console return 'Console Restart' messages
175
-------------------------------------------------
176
177
There are three cases where a console may be restarted:
178
179
1. **Console Restart: The IVLE console has timed out due to inactivity**
180
181
    The Python console process is no longer running. This is most likey due to 
182
    the console process being automatically terminated due to no messages 
183
    being sent or received by the console in the previous 15 minutes.
184
185
    This message can also be triggered if the console is terminated for 
186
    another reason (such as being sent :const:`SIGKILL` from the system 
187
    command line or any other fatal signal).
188
189
2. **Console Restart: CPU Time Limit Exceeded**
190
191
   To prevent exhaustion of local system resources, Python console processes 
192
   are set with an CPU Time Limit of 25 seconds of user time (time executing 
193
   on the CPU rather than real "clock-on-the-wall" time).
194
195
   This setting can be configured by changing the values associated with 
196
   :const:`RLIMIT_CPU` in :file:`bin/trampoline/trampoline.c`.
197
198
3. **Console Restart: Communication to console process lost**
199
200
    IVLE was unable to understand a response from the console process. This 
201
    will only happen if the console sends a malformed response and quite 
202
    likely a bug.
203
204
4. **Console Restart: Communication to console process reset**
205
206
    IVLE's TCP connection to the console process was reset. May indicate 
207
    network issues.
208