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

« back to all changes in this revision

Viewing changes to doc/man/scripts.rst

  • Committer: William Grant
  • Date: 2010-02-15 05:37:50 UTC
  • Revision ID: grantw@unimelb.edu.au-20100215053750-hihmegnp8e7dshc2
Ignore test coverage files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-admin-scripts:
 
19
 
 
20
*************
 
21
Admin scripts
 
22
*************
 
23
 
 
24
IVLE has a number of admin scripts for uncommon configuration or other
 
25
functionality not available in the web application.
 
26
 
 
27
Most of these scripts must be run as root.
 
28
 
 
29
ivle-addexercise
 
30
----------------
 
31
 
 
32
.. program:: ivle-addexercise
 
33
 
 
34
:program:`ivle-addexercise <EXERCISE>`
 
35
 
 
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.
 
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
 
 
53
Creates a new user in the database. On-disk structures (jails and
 
54
Subversion repositories) will be created upon first login.
 
55
 
 
56
.. FIXME: "This can also be done through the administration interface."
 
57
    (Not yet!)
 
58
 
 
59
 
 
60
.. cmdoption:: <LOGIN>
 
61
 
 
62
    Login name of the new user
 
63
 
 
64
.. cmdoption:: <FULLNAME>
 
65
 
 
66
    Full name of the user
 
67
 
 
68
.. cmdoption:: -p <PASSWORD>, --password <PASSWORD>
 
69
 
 
70
    Cleartext password. If omitted, external authentication mechanisms
 
71
    will be tried.
 
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
 
 
87
    Give the user global IVLE administrative privileges
 
88
 
 
89
 
 
90
ivle-buildjail
 
91
--------------
 
92
 
 
93
.. program:: ivle-buildjail
 
94
 
 
95
:program:`ivle-buildjail [OPTIONS]`
 
96
 
 
97
Creates or updates the IVLE jail template. 
 
98
 
 
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
 
 
114
    Sets the APT mirror. May also be specified in the ``jail/mirror``
 
115
    config key.
 
116
 
 
117
 
 
118
ivle-cloneworksheets
 
119
--------------------
 
120
 
 
121
.. program:: ivle-cloneworksheets
 
122
 
 
123
:program:`ivle-cloneworksheets <OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER> 
 
124
<NEWSUBJECTCODE> <NEWYEAR> <NEWSEMESTER>`
 
125
 
 
126
Populates the offering specified by ``<NEWSUBJECTCODE> <NEWYEAR> 
 
127
<NEWSEMESTER>`` with a copy of the worksheets from the offering specified by 
 
128
``<OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER>``.
 
129
 
 
130
 
 
131
ivle-config
 
132
-----------
 
133
 
 
134
.. program:: ivle-config
 
135
 
 
136
:program:`ivle-config [ARG1] [ARG2] ...`
 
137
 
 
138
Configures IVLE with machine-specific details, most notably various paths.
 
139
Either prompts the administrator for these details or accepts them as
 
140
command line arguments.
 
141
 
 
142
Command line arguments may be any of the :ref:`configuration option 
 
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
 
 
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.
 
151
 
 
152
 
 
153
ivle-createdatadirs
 
154
-------------------
 
155
 
 
156
.. program:: ivle-createdatadirs
 
157
 
 
158
:program:`ivle-createdatadirs`
 
159
 
 
160
Creates the IVLE data hierarchy (by default under :file:`/var/lib/ivle`) if
 
161
it does not already exist.
 
162
 
 
163
 
 
164
ivle-enrol
 
165
----------
 
166
 
 
167
.. program:: ivle-enrol
 
168
 
 
169
:program:`ivle-enrol <LOGIN> <SUBJECTCODE> <YEAR> <SEMESTER> [ROLE]`
 
170
 
 
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.
 
176
 
 
177
.. cmdoption:: <LOGIN>
 
178
 
 
179
    Login of the user to enrol
 
180
 
 
181
.. cmdoption:: <SUBJECTCODE>
 
182
 
 
183
    Subject code
 
184
 
 
185
.. cmdoption:: <YEAR>
 
186
 
 
187
    Offering year
 
188
 
 
189
.. cmdoption:: <SEMESTER>
 
190
 
 
191
    Offering semester
 
192
 
 
193
.. cmdoption:: [ROLE]
 
194
 
 
195
    Role of the user. Should be one of 'student' (default), 'tutor' or
 
196
    'lecturer'.
 
197
 
 
198
 
 
199
ivle-enrolallusers
 
200
------------------
 
201
 
 
202
.. program:: ivle-enrolallusers
 
203
 
 
204
:program:`ivle-enrolallusers`
 
205
 
 
206
Adds enrolments for all users on the system.
 
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
 
 
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.
 
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
 
 
230
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECT>`
 
231
 
 
232
Retrieves all submissions for a given project. Places each submission in its 
 
233
own subdirectory of the current directory. Any errors are reported to stderr
 
234
(otherwise is silent).
 
235
 
 
236
.. note::
 
237
    Since this script accesses Subversion repositories through the
 
238
    filesystem, it must be run on the master server.
 
239
 
 
240
.. cmdoption:: <SUBJECT>
 
241
 
 
242
    Subject short (URL) name
 
243
 
 
244
.. cmdoption:: <PROJECTNAME>
 
245
 
 
246
    Project short (URL) name
 
247
 
 
248
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
 
249
 
 
250
    Semester of the offering (eg. 2009/1). Defaults to the currently
 
251
    active semester.
 
252
 
 
253
.. cmdoption:: -d <PATH>, --dest <PATH>
 
254
 
 
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``.
 
258
 
 
259
.. cmdoption:: -z, --zip
 
260
 
 
261
    Store each submission in a Zip file.
 
262
 
 
263
.. cmdoption:: -v, --verbose
 
264
 
 
265
    Print the name of each submission as it is extracted.
 
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
 
 
279
Lists all users in the IVLE database.
 
280
 
 
281
.. cmdoption:: -n, --names
 
282
 
 
283
    Print only each user's login name
 
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
 
 
297
    Subject short (URL) name
 
298
 
 
299
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
 
300
 
 
301
    Semester of the offering (eg. 2009/1). Defaults to the currently
 
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
 
 
321
    Administrators should not need to manually run this script for regular
 
322
    operation.  IVLE will automatically mount users' jails on demand.
 
323
 
 
324
.. cmdoption:: -v, --verbose
 
325
 
 
326
    Print a message for each mount or unmount.
 
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
 
 
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.
 
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
 
 
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.
 
373
 
 
374
.. cmdoption:: <USER>
 
375
 
 
376
    Login of the user whose jail should be rebuilt
 
377
 
 
378
.. cmdoption:: -a, --all
 
379
 
 
380
    Rebuild the jail of every user
 
381
 
 
382
.. cmdoption:: -v, --verbose
 
383
 
 
384
    Print a message as each user's jail is remade
 
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, 
 
395
semester and the held role for each subject in which they are enrolled.
 
396
 
 
397
.. cmdoption:: <USER>
 
398
 
 
399
    Login of the user