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

1164.2.11 by Matt Giuca
More headings and files!
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
1386 by David Coles
Some examples for unusual config parameters
18
.. _ref-admin-scripts:
19
1164.2.11 by Matt Giuca
More headings and files!
20
*************
21
Admin scripts
22
*************
23
1401 by William Grant
Clean up and correct the admin scripts documentation.
24
IVLE has a number of admin scripts for uncommon configuration or other
25
functionality not available in the web application.
1363 by David Coles
Admin documentation of the admin scripts
26
1401 by William Grant
Clean up and correct the admin scripts documentation.
27
Most of these scripts must be run as root.
1363 by David Coles
Admin documentation of the admin scripts
28
29
ivle-addexercise
30
----------------
31
32
.. program:: ivle-addexercise
33
34
:program:`ivle-addexercise <EXERCISE>`
35
1401 by William Grant
Clean up and correct the admin scripts documentation.
36
Adds an XML encoded exercise to the IVLE database. This is primarily
37
for importing exercises that pre-date the database storage system.
38
39
The exercise's name will be set to the complete path specified on the
40
command line -- keep this in mind when choosing a working directory.
1363 by David Coles
Admin documentation of the admin scripts
41
42
.. cmdoption:: <EXERCISE>
43
44
    The XML file containing the exercise to be uploaded.
45
46
ivle-adduser
47
------------
48
49
.. program:: ivle-adduser
50
51
:program:`ivle-adduser [OPTIONS] <LOGIN> <FULLNAME>`
52
1401 by William Grant
Clean up and correct the admin scripts documentation.
53
Creates a new user in the database. On-disk structures (jails and
54
Subversion repositories) will be created upon first login.
1363 by David Coles
Admin documentation of the admin scripts
55
56
.. FIXME: "This can also be done through the administration interface."
57
    (Not yet!)
58
59
60
.. cmdoption:: <LOGIN>
61
1401 by William Grant
Clean up and correct the admin scripts documentation.
62
    Login name of the new user
1363 by David Coles
Admin documentation of the admin scripts
63
64
.. cmdoption:: <FULLNAME>
65
1401 by William Grant
Clean up and correct the admin scripts documentation.
66
    Full name of the user
1363 by David Coles
Admin documentation of the admin scripts
67
68
.. cmdoption:: -p <PASSWORD>, --password <PASSWORD>
69
1401 by William Grant
Clean up and correct the admin scripts documentation.
70
    Cleartext password. If omitted, external authentication mechanisms
71
    will be tried.
1363 by David Coles
Admin documentation of the admin scripts
72
73
.. cmdoption:: -n <NICK>, --nick <NICK>
74
75
    Display name (defaults to <FULLNAME>)
76
77
.. cmdoption:: -e <EMAIL>, --email <EMAIL>
78
79
    Email address
80
81
.. cmdoption:: -s <SID>, --studentid <SID>
82
83
    Student ID
84
85
.. cmdoption:: --admin
86
1401 by William Grant
Clean up and correct the admin scripts documentation.
87
    Give the user global IVLE administrative privileges
1363 by David Coles
Admin documentation of the admin scripts
88
89
90
ivle-buildjail
91
--------------
92
93
.. program:: ivle-buildjail
94
95
:program:`ivle-buildjail [OPTIONS]`
96
1401 by William Grant
Clean up and correct the admin scripts documentation.
97
Creates or updates the IVLE jail template. 
98
1363 by David Coles
Admin documentation of the admin scripts
99
.. cmdoption:: -r, --recreate
100
101
    Completely recreate the jail - don't just update its IVLE code.
102
103
    .. warning::
104
105
        This may download hundreds of megabytes from the location specified by 
106
        ``<MIRROR>``.
107
108
.. cmdoption:: -u, --upgrade
109
110
    Apply any package updates in the jail.
111
112
.. cmdoption:: -m <MIRROR>, --mirror <MIRROR>
113
1401 by William Grant
Clean up and correct the admin scripts documentation.
114
    Sets the APT mirror. May also be specified in the ``jail/mirror``
115
    config key.
1363 by David Coles
Admin documentation of the admin scripts
116
117
118
ivle-cloneworksheets
119
--------------------
120
121
.. program:: ivle-cloneworksheets
122
123
:program:`ivle-cloneworksheets <OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER> 
124
<NEWSUBJECTCODE> <NEWYEAR> <NEWSEMESTER>`
125
1401 by William Grant
Clean up and correct the admin scripts documentation.
126
Populates the offering specified by ``<NEWSUBJECTCODE> <NEWYEAR> 
127
<NEWSEMESTER>`` with a copy of the worksheets from the offering specified by 
1363 by David Coles
Admin documentation of the admin scripts
128
``<OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER>``.
129
1692 by William Grant
Note that ivle-cloneworksheets and ivle-listusers have web UI counterparts.
130
.. note::
131
    Admins may also clone worksheets from the offering administration panel
132
    in the web interface.
133
1363 by David Coles
Admin documentation of the admin scripts
134
135
ivle-config
136
-----------
137
138
.. program:: ivle-config
139
140
:program:`ivle-config [ARG1] [ARG2] ...`
141
1401 by William Grant
Clean up and correct the admin scripts documentation.
142
Configures IVLE with machine-specific details, most notably various paths.
1363 by David Coles
Admin documentation of the admin scripts
143
Either prompts the administrator for these details or accepts them as
1401 by William Grant
Clean up and correct the admin scripts documentation.
144
command line arguments.
1363 by David Coles
Admin documentation of the admin scripts
145
1401 by William Grant
Clean up and correct the admin scripts documentation.
146
Command line arguments may be any of the :ref:`configuration option 
1363 by David Coles
Admin documentation of the admin scripts
147
<ref-configuration-options>` used in :file:`ivle.conf`. They are provided in 
148
the form of :samp:`--{section}/{subsection}/{property} {VALUE}` such as 
149
``--urls/root ivle.org`` or ``--media/externals/jquery 
150
/usr/share/javascript/jquery``.
151
1401 by William Grant
Clean up and correct the admin scripts documentation.
152
Creates or updates :file:`/etc/ivle/ivle.conf` with the selected values,
153
and overwrites :file:`/etc/ivle/plugins.d/000default` with the latest
154
default plugin list.
1363 by David Coles
Admin documentation of the admin scripts
155
156
157
ivle-createdatadirs
158
-------------------
159
160
.. program:: ivle-createdatadirs
161
162
:program:`ivle-createdatadirs`
163
1401 by William Grant
Clean up and correct the admin scripts documentation.
164
Creates the IVLE data hierarchy (by default under :file:`/var/lib/ivle`) if
165
it does not already exist.
1363 by David Coles
Admin documentation of the admin scripts
166
167
168
ivle-enrol
169
----------
170
171
.. program:: ivle-enrol
172
173
:program:`ivle-enrol <LOGIN> <SUBJECTCODE> <YEAR> <SEMESTER> [ROLE]`
174
1401 by William Grant
Clean up and correct the admin scripts documentation.
175
Enrols a user in an offering.
176
177
.. note::
178
    Users may also be enrolled from the offering administration panel
179
    in the web interface.
1363 by David Coles
Admin documentation of the admin scripts
180
181
.. cmdoption:: <LOGIN>
182
1401 by William Grant
Clean up and correct the admin scripts documentation.
183
    Login of the user to enrol
1363 by David Coles
Admin documentation of the admin scripts
184
185
.. cmdoption:: <SUBJECTCODE>
186
1401 by William Grant
Clean up and correct the admin scripts documentation.
187
    Subject code
1363 by David Coles
Admin documentation of the admin scripts
188
189
.. cmdoption:: <YEAR>
190
1401 by William Grant
Clean up and correct the admin scripts documentation.
191
    Offering year
1363 by David Coles
Admin documentation of the admin scripts
192
193
.. cmdoption:: <SEMESTER>
194
1401 by William Grant
Clean up and correct the admin scripts documentation.
195
    Offering semester
1363 by David Coles
Admin documentation of the admin scripts
196
197
.. cmdoption:: [ROLE]
198
1401 by William Grant
Clean up and correct the admin scripts documentation.
199
    Role of the user. Should be one of 'student' (default), 'tutor' or
1363 by David Coles
Admin documentation of the admin scripts
200
    'lecturer'.
201
202
203
ivle-enrolallusers
204
------------------
205
206
.. program:: ivle-enrolallusers
207
208
:program:`ivle-enrolallusers`
209
1401 by William Grant
Clean up and correct the admin scripts documentation.
210
Adds enrolments for all users on the system.
1363 by David Coles
Admin documentation of the admin scripts
211
Pulls from the configured :ref:`subject pulldown module 
212
<ref-subject-pulldown-modules>` the subjects each student
213
is enrolled in, and adds enrolments to the database.
214
Does not remove any enrolments.
215
1401 by William Grant
Clean up and correct the admin scripts documentation.
216
.. note::
217
    Pulldown modules are consulted for each user each time they log in,
218
    so use of this script may not be required.
1363 by David Coles
Admin documentation of the admin scripts
219
220
.. cmdoption:: -u <LOGIN>, --user <LOGIN>
221
222
    Just perform enrolment for user ``<LOGIN>``
223
224
.. cmdoption:: -v, --verbose
225
226
    Print out the details of each enrolment.
227
228
229
ivle-fetchsubmissions
230
---------------------
231
232
.. program:: ivle-fetchsubmissions
233
1401 by William Grant
Clean up and correct the admin scripts documentation.
234
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECT>`
1363 by David Coles
Admin documentation of the admin scripts
235
236
Retrieves all submissions for a given project. Places each submission in its 
1401 by William Grant
Clean up and correct the admin scripts documentation.
237
own subdirectory of the current directory. Any errors are reported to stderr
1363 by David Coles
Admin documentation of the admin scripts
238
(otherwise is silent).
239
1401 by William Grant
Clean up and correct the admin scripts documentation.
240
.. note::
241
    Since this script accesses Subversion repositories through the
242
    filesystem, it must be run on the master server.
1363 by David Coles
Admin documentation of the admin scripts
243
244
.. cmdoption:: <SUBJECT>
245
1401 by William Grant
Clean up and correct the admin scripts documentation.
246
    Subject short (URL) name
1363 by David Coles
Admin documentation of the admin scripts
247
248
.. cmdoption:: <PROJECTNAME>
249
1401 by William Grant
Clean up and correct the admin scripts documentation.
250
    Project short (URL) name
1363 by David Coles
Admin documentation of the admin scripts
251
252
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
253
1401 by William Grant
Clean up and correct the admin scripts documentation.
254
    Semester of the offering (eg. 2009/1). Defaults to the currently
1363 by David Coles
Admin documentation of the admin scripts
255
    active semester.
256
257
.. cmdoption:: -d <PATH>, --dest <PATH>
258
1401 by William Grant
Clean up and correct the admin scripts documentation.
259
    Destination directory (defaults to the current directory) in
260
    which to place submissions. Will create subdirectories in this
261
    directory of the form ``subject/year/semester/project``.
1363 by David Coles
Admin documentation of the admin scripts
262
263
.. cmdoption:: -z, --zip
264
265
    Store each submission in a Zip file.
266
267
.. cmdoption:: -v, --verbose
268
1401 by William Grant
Clean up and correct the admin scripts documentation.
269
    Print the name of each submission as it is extracted.
1363 by David Coles
Admin documentation of the admin scripts
270
271
.. cmdoption:: --no-txt
272
273
    Disable writing a text file with metadata about each submission.
274
275
276
ivle-listusers
277
--------------
278
279
.. program:: ivle-listusers
280
281
:program:`ivle-listusers [OPTIONS]`
282
1401 by William Grant
Clean up and correct the admin scripts documentation.
283
Lists all users in the IVLE database.
1363 by David Coles
Admin documentation of the admin scripts
284
1692 by William Grant
Note that ivle-cloneworksheets and ivle-listusers have web UI counterparts.
285
.. note::
286
    Users may also be listed and administered through the web interface,
287
    from the *Users* item in the IVLE menu.
288
1363 by David Coles
Admin documentation of the admin scripts
289
.. cmdoption:: -n, --names
290
1401 by William Grant
Clean up and correct the admin scripts documentation.
291
    Print only each user's login name
1363 by David Coles
Admin documentation of the admin scripts
292
293
294
ivle-mountallusers
295
------------------
296
297
.. program:: ivle-mountallusers
298
299
:program:`ivle-mountallusers`
300
301
Attempts to mount the jails of all users.
302
303
.. note::
304
1401 by William Grant
Clean up and correct the admin scripts documentation.
305
    Administrators should not need to manually run this script for regular
306
    operation.  IVLE will automatically mount users' jails on demand.
1363 by David Coles
Admin documentation of the admin scripts
307
308
.. cmdoption:: -v, --verbose
309
1401 by William Grant
Clean up and correct the admin scripts documentation.
310
    Print a message for each mount or unmount.
1363 by David Coles
Admin documentation of the admin scripts
311
312
.. cmdoption:: -u, --unmount
313
314
    Unmount jails instead of mounting them.
315
316
317
ivle-refreshfilesystem
318
----------------------
319
320
.. program:: ivle-refreshfilesystem
321
322
:program:`ivle-refreshfilesystem`
323
1401 by William Grant
Clean up and correct the admin scripts documentation.
324
Refresh parts of the filesystem to match the database.
325
326
In particular:
327
 - all jails are rebuilt
328
 - missing user jails are created
329
 - missing user and group Subversion repositories are created
330
 - jails for missing users are removed
331
 - Subversion repositories for missing users or groups are removed
332
 - the Subversion password file is updated
333
 - the Subversion authorisation files are rewritten
334
335
.. warning::
336
    Due to the full jail rebuilds, existing jail mounts may be broken
337
    after this script has run. To recover from this situation, use
338
    ``ivle-mountallusers`` to unmount all of the jails.
339
340
.. note::
341
    Jails and Subversion repositories are not entirely removed. They
342
    can be found in a timestamped directory alongside their parent.
1363 by David Coles
Admin documentation of the admin scripts
343
344
345
ivle-remakeuser
346
---------------
347
348
.. program:: ivle-remakeuser
349
350
:program:`ivle-remakeuser [OPTIONS] <USER>`
351
352
:program:`ivle-remakeuser [OPTIONS] -a`
353
1401 by William Grant
Clean up and correct the admin scripts documentation.
354
Rebuilds the jail of a single user or of all users in IVLE. This will
355
retain all user data, but recreate the rest of the hierarchy and
356
internal configuration files.
1363 by David Coles
Admin documentation of the admin scripts
357
358
.. cmdoption:: <USER>
359
1401 by William Grant
Clean up and correct the admin scripts documentation.
360
    Login of the user whose jail should be rebuilt
1363 by David Coles
Admin documentation of the admin scripts
361
362
.. cmdoption:: -a, --all
363
1401 by William Grant
Clean up and correct the admin scripts documentation.
364
    Rebuild the jail of every user
365
366
.. cmdoption:: -v, --verbose
367
368
    Print a message as each user's jail is remade
1363 by David Coles
Admin documentation of the admin scripts
369
370
371
ivle-showenrolment
372
------------------
373
374
.. program:: ivle-showenrolment
375
376
:program:`ivle-showenrolment <USER>`
377
378
Shows the enrolments of a user. Prints subject code, subject name, year, 
1401 by William Grant
Clean up and correct the admin scripts documentation.
379
semester and the held role for each subject in which they are enrolled.
1363 by David Coles
Admin documentation of the admin scripts
380
381
.. cmdoption:: <USER>
382
1401 by William Grant
Clean up and correct the admin scripts documentation.
383
    Login of the user