~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
130
131
ivle-config
132
-----------
133
134
.. program:: ivle-config
135
136
:program:`ivle-config [ARG1] [ARG2] ...`
137
1401 by William Grant
Clean up and correct the admin scripts documentation.
138
Configures IVLE with machine-specific details, most notably various paths.
1363 by David Coles
Admin documentation of the admin scripts
139
Either prompts the administrator for these details or accepts them as
1401 by William Grant
Clean up and correct the admin scripts documentation.
140
command line arguments.
1363 by David Coles
Admin documentation of the admin scripts
141
1401 by William Grant
Clean up and correct the admin scripts documentation.
142
Command line arguments may be any of the :ref:`configuration option 
1363 by David Coles
Admin documentation of the admin scripts
143
<ref-configuration-options>` used in :file:`ivle.conf`. They are provided in 
144
the form of :samp:`--{section}/{subsection}/{property} {VALUE}` such as 
145
``--urls/root ivle.org`` or ``--media/externals/jquery 
146
/usr/share/javascript/jquery``.
147
1401 by William Grant
Clean up and correct the admin scripts documentation.
148
Creates or updates :file:`/etc/ivle/ivle.conf` with the selected values,
149
and overwrites :file:`/etc/ivle/plugins.d/000default` with the latest
150
default plugin list.
1363 by David Coles
Admin documentation of the admin scripts
151
152
153
ivle-createdatadirs
154
-------------------
155
156
.. program:: ivle-createdatadirs
157
158
:program:`ivle-createdatadirs`
159
1401 by William Grant
Clean up and correct the admin scripts documentation.
160
Creates the IVLE data hierarchy (by default under :file:`/var/lib/ivle`) if
161
it does not already exist.
1363 by David Coles
Admin documentation of the admin scripts
162
163
164
ivle-enrol
165
----------
166
167
.. program:: ivle-enrol
168
169
:program:`ivle-enrol <LOGIN> <SUBJECTCODE> <YEAR> <SEMESTER> [ROLE]`
170
1401 by William Grant
Clean up and correct the admin scripts documentation.
171
Enrols a user in an offering.
172
173
.. note::
174
    Users may also be enrolled from the offering administration panel
175
    in the web interface.
1363 by David Coles
Admin documentation of the admin scripts
176
177
.. cmdoption:: <LOGIN>
178
1401 by William Grant
Clean up and correct the admin scripts documentation.
179
    Login of the user to enrol
1363 by David Coles
Admin documentation of the admin scripts
180
181
.. cmdoption:: <SUBJECTCODE>
182
1401 by William Grant
Clean up and correct the admin scripts documentation.
183
    Subject code
1363 by David Coles
Admin documentation of the admin scripts
184
185
.. cmdoption:: <YEAR>
186
1401 by William Grant
Clean up and correct the admin scripts documentation.
187
    Offering year
1363 by David Coles
Admin documentation of the admin scripts
188
189
.. cmdoption:: <SEMESTER>
190
1401 by William Grant
Clean up and correct the admin scripts documentation.
191
    Offering semester
1363 by David Coles
Admin documentation of the admin scripts
192
193
.. cmdoption:: [ROLE]
194
1401 by William Grant
Clean up and correct the admin scripts documentation.
195
    Role of the user. Should be one of 'student' (default), 'tutor' or
1363 by David Coles
Admin documentation of the admin scripts
196
    'lecturer'.
197
198
199
ivle-enrolallusers
200
------------------
201
202
.. program:: ivle-enrolallusers
203
204
:program:`ivle-enrolallusers`
205
1401 by William Grant
Clean up and correct the admin scripts documentation.
206
Adds enrolments for all users on the system.
1363 by David Coles
Admin documentation of the admin scripts
207
Pulls from the configured :ref:`subject pulldown module 
208
<ref-subject-pulldown-modules>` the subjects each student
209
is enrolled in, and adds enrolments to the database.
210
Does not remove any enrolments.
211
1401 by William Grant
Clean up and correct the admin scripts documentation.
212
.. note::
213
    Pulldown modules are consulted for each user each time they log in,
214
    so use of this script may not be required.
1363 by David Coles
Admin documentation of the admin scripts
215
216
.. cmdoption:: -u <LOGIN>, --user <LOGIN>
217
218
    Just perform enrolment for user ``<LOGIN>``
219
220
.. cmdoption:: -v, --verbose
221
222
    Print out the details of each enrolment.
223
224
225
ivle-fetchsubmissions
226
---------------------
227
228
.. program:: ivle-fetchsubmissions
229
1401 by William Grant
Clean up and correct the admin scripts documentation.
230
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECT>`
1363 by David Coles
Admin documentation of the admin scripts
231
232
Retrieves all submissions for a given project. Places each submission in its 
1401 by William Grant
Clean up and correct the admin scripts documentation.
233
own subdirectory of the current directory. Any errors are reported to stderr
1363 by David Coles
Admin documentation of the admin scripts
234
(otherwise is silent).
235
1401 by William Grant
Clean up and correct the admin scripts documentation.
236
.. note::
237
    Since this script accesses Subversion repositories through the
238
    filesystem, it must be run on the master server.
1363 by David Coles
Admin documentation of the admin scripts
239
240
.. cmdoption:: <SUBJECT>
241
1401 by William Grant
Clean up and correct the admin scripts documentation.
242
    Subject short (URL) name
1363 by David Coles
Admin documentation of the admin scripts
243
244
.. cmdoption:: <PROJECTNAME>
245
1401 by William Grant
Clean up and correct the admin scripts documentation.
246
    Project short (URL) name
1363 by David Coles
Admin documentation of the admin scripts
247
248
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
249
1401 by William Grant
Clean up and correct the admin scripts documentation.
250
    Semester of the offering (eg. 2009/1). Defaults to the currently
1363 by David Coles
Admin documentation of the admin scripts
251
    active semester.
252
253
.. cmdoption:: -d <PATH>, --dest <PATH>
254
1401 by William Grant
Clean up and correct the admin scripts documentation.
255
    Destination directory (defaults to the current directory) in
256
    which to place submissions. Will create subdirectories in this
257
    directory of the form ``subject/year/semester/project``.
1363 by David Coles
Admin documentation of the admin scripts
258
259
.. cmdoption:: -z, --zip
260
261
    Store each submission in a Zip file.
262
263
.. cmdoption:: -v, --verbose
264
1401 by William Grant
Clean up and correct the admin scripts documentation.
265
    Print the name of each submission as it is extracted.
1363 by David Coles
Admin documentation of the admin scripts
266
267
.. cmdoption:: --no-txt
268
269
    Disable writing a text file with metadata about each submission.
270
271
272
ivle-listusers
273
--------------
274
275
.. program:: ivle-listusers
276
277
:program:`ivle-listusers [OPTIONS]`
278
1401 by William Grant
Clean up and correct the admin scripts documentation.
279
Lists all users in the IVLE database.
1363 by David Coles
Admin documentation of the admin scripts
280
281
.. cmdoption:: -n, --names
282
1401 by William Grant
Clean up and correct the admin scripts documentation.
283
    Print only each user's login name
1363 by David Coles
Admin documentation of the admin scripts
284
285
286
ivle-marks
287
----------
288
289
.. program:: ivle-marks
290
291
:program:`ivle-marks [OPTIONS] <SUBJECT>`
292
293
Reports each student's marks for a given subject offering.
294
295
.. cmdoption:: <SUBJECT>
296
1401 by William Grant
Clean up and correct the admin scripts documentation.
297
    Subject short (URL) name
1363 by David Coles
Admin documentation of the admin scripts
298
299
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
300
1401 by William Grant
Clean up and correct the admin scripts documentation.
301
    Semester of the offering (eg. 2009/1). Defaults to the currently
1363 by David Coles
Admin documentation of the admin scripts
302
    active semester.
303
304
.. cmdoption:: -c <CUTOFF>, --cutoff <CUTOFF>
305
306
    Cutoff date (calculate the marks as of this date). Should be provided in 
307
    the form of ``YYYY-MM-DD H:M:S``.
308
309
310
ivle-mountallusers
311
------------------
312
313
.. program:: ivle-mountallusers
314
315
:program:`ivle-mountallusers`
316
317
Attempts to mount the jails of all users.
318
319
.. note::
320
1401 by William Grant
Clean up and correct the admin scripts documentation.
321
    Administrators should not need to manually run this script for regular
322
    operation.  IVLE will automatically mount users' jails on demand.
1363 by David Coles
Admin documentation of the admin scripts
323
324
.. cmdoption:: -v, --verbose
325
1401 by William Grant
Clean up and correct the admin scripts documentation.
326
    Print a message for each mount or unmount.
1363 by David Coles
Admin documentation of the admin scripts
327
328
.. cmdoption:: -u, --unmount
329
330
    Unmount jails instead of mounting them.
331
332
333
ivle-refreshfilesystem
334
----------------------
335
336
.. program:: ivle-refreshfilesystem
337
338
:program:`ivle-refreshfilesystem`
339
1401 by William Grant
Clean up and correct the admin scripts documentation.
340
Refresh parts of the filesystem to match the database.
341
342
In particular:
343
 - all jails are rebuilt
344
 - missing user jails are created
345
 - missing user and group Subversion repositories are created
346
 - jails for missing users are removed
347
 - Subversion repositories for missing users or groups are removed
348
 - the Subversion password file is updated
349
 - the Subversion authorisation files are rewritten
350
351
.. warning::
352
    Due to the full jail rebuilds, existing jail mounts may be broken
353
    after this script has run. To recover from this situation, use
354
    ``ivle-mountallusers`` to unmount all of the jails.
355
356
.. note::
357
    Jails and Subversion repositories are not entirely removed. They
358
    can be found in a timestamped directory alongside their parent.
1363 by David Coles
Admin documentation of the admin scripts
359
360
361
ivle-remakeuser
362
---------------
363
364
.. program:: ivle-remakeuser
365
366
:program:`ivle-remakeuser [OPTIONS] <USER>`
367
368
:program:`ivle-remakeuser [OPTIONS] -a`
369
1401 by William Grant
Clean up and correct the admin scripts documentation.
370
Rebuilds the jail of a single user or of all users in IVLE. This will
371
retain all user data, but recreate the rest of the hierarchy and
372
internal configuration files.
1363 by David Coles
Admin documentation of the admin scripts
373
374
.. cmdoption:: <USER>
375
1401 by William Grant
Clean up and correct the admin scripts documentation.
376
    Login of the user whose jail should be rebuilt
1363 by David Coles
Admin documentation of the admin scripts
377
378
.. cmdoption:: -a, --all
379
1401 by William Grant
Clean up and correct the admin scripts documentation.
380
    Rebuild the jail of every user
381
382
.. cmdoption:: -v, --verbose
383
384
    Print a message as each user's jail is remade
1363 by David Coles
Admin documentation of the admin scripts
385
386
387
ivle-showenrolment
388
------------------
389
390
.. program:: ivle-showenrolment
391
392
:program:`ivle-showenrolment <USER>`
393
394
Shows the enrolments of a user. Prints subject code, subject name, year, 
1401 by William Grant
Clean up and correct the admin scripts documentation.
395
semester and the held role for each subject in which they are enrolled.
1363 by David Coles
Admin documentation of the admin scripts
396
397
.. cmdoption:: <USER>
398
1401 by William Grant
Clean up and correct the admin scripts documentation.
399
    Login of the user