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