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

« back to all changes in this revision

Viewing changes to doc/man/scripts.rst

  • Committer: David Coles
  • Date: 2009-12-10 05:07:55 UTC
  • Revision ID: coles.david@gmail.com-20091210050755-10adc9gqwms971n2
Add python-configobj to ivle-buildjail as it is required for the correct functioning of IVLE

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
Admin scripts
22
22
*************
23
23
 
24
 
IVLE has a number of admin scripts for uncommon configuration or other
25
 
functionality not available in the web application.
 
24
IVLE has a number of Admin scripts to configure IVLE or for functionality not  
 
25
directly in the web application.
26
26
 
27
 
Most of these scripts must be run as root.
 
27
Most of these script are required to be run as root.
28
28
 
29
29
ivle-addexercise
30
30
----------------
33
33
 
34
34
:program:`ivle-addexercise <EXERCISE>`
35
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.
 
36
Adds an XML encoded exercise to the IVLE database.
41
37
 
42
38
.. cmdoption:: <EXERCISE>
43
39
 
50
46
 
51
47
:program:`ivle-adduser [OPTIONS] <LOGIN> <FULLNAME>`
52
48
 
53
 
Creates a new user in the database. On-disk structures (jails and
54
 
Subversion repositories) will be created upon first login.
 
49
Script to create a new user.
55
50
 
56
51
.. FIXME: "This can also be done through the administration interface."
57
52
    (Not yet!)
58
53
 
 
54
This script wraps common.makeuser. It also creates a unix account which 
 
55
common.makeuser does not. (This script may not be appropriate for production 
 
56
on a multi-node environment)
59
57
 
60
58
.. cmdoption:: <LOGIN>
61
59
 
62
 
    Login name of the new user
 
60
    The login name of the new user
63
61
 
64
62
.. cmdoption:: <FULLNAME>
65
63
 
66
 
    Full name of the user
 
64
    The full name of the user
67
65
 
68
66
.. cmdoption:: -p <PASSWORD>, --password <PASSWORD>
69
67
 
70
 
    Cleartext password. If omitted, external authentication mechanisms
71
 
    will be tried.
 
68
    Cleartext password
72
69
 
73
70
.. cmdoption:: -n <NICK>, --nick <NICK>
74
71
 
84
81
 
85
82
.. cmdoption:: --admin
86
83
 
87
 
    Give the user global IVLE administrative privileges
 
84
    Give the user full administrative privileges
88
85
 
89
86
 
90
87
ivle-buildjail
94
91
 
95
92
:program:`ivle-buildjail [OPTIONS]`
96
93
 
97
 
Creates or updates the IVLE jail template. 
98
 
 
99
94
.. cmdoption:: -r, --recreate
100
95
 
101
96
    Completely recreate the jail - don't just update its IVLE code.
111
106
 
112
107
.. cmdoption:: -m <MIRROR>, --mirror <MIRROR>
113
108
 
114
 
    Sets the APT mirror. May also be specified in the ``jail/mirror``
115
 
    config key.
 
109
    Sets the APT mirror.
116
110
 
117
111
 
118
112
ivle-cloneworksheets
123
117
:program:`ivle-cloneworksheets <OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER> 
124
118
<NEWSUBJECTCODE> <NEWYEAR> <NEWSEMESTER>`
125
119
 
126
 
Populates the offering specified by ``<NEWSUBJECTCODE> <NEWYEAR> 
127
 
<NEWSEMESTER>`` with a copy of the worksheets from the offering specified by 
 
120
Populates the subject specified by ``<NEWSUBJECTCODE> <NEWYEAR> 
 
121
<NEWSEMESTER>`` with a copy of the worksheets from the subject specified by 
128
122
``<OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER>``.
129
123
 
130
124
 
135
129
 
136
130
:program:`ivle-config [ARG1] [ARG2] ...`
137
131
 
138
 
Configures IVLE with machine-specific details, most notably various paths.
 
132
Configures IVLE with machine-specific details, most notably, various paths.
139
133
Either prompts the administrator for these details or accepts them as
140
 
command line arguments.
 
134
command-line args.
141
135
 
142
 
Command line arguments may be any of the :ref:`configuration option 
 
136
Command-line arguments may be any of the :ref:`configuration option 
143
137
<ref-configuration-options>` used in :file:`ivle.conf`. They are provided in 
144
138
the form of :samp:`--{section}/{subsection}/{property} {VALUE}` such as 
145
139
``--urls/root ivle.org`` or ``--media/externals/jquery 
146
140
/usr/share/javascript/jquery``.
147
141
 
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.
 
142
Automatically creates the file :file:`/etc/ivle.conf`.
151
143
 
152
144
 
153
145
ivle-createdatadirs
157
149
 
158
150
:program:`ivle-createdatadirs`
159
151
 
160
 
Creates the IVLE data hierarchy (by default under :file:`/var/lib/ivle`) if
161
 
it does not already exist.
 
152
Creates an IVLE data hierarchy if it does not already exist.
162
153
 
163
154
 
164
155
ivle-enrol
168
159
 
169
160
:program:`ivle-enrol <LOGIN> <SUBJECTCODE> <YEAR> <SEMESTER> [ROLE]`
170
161
 
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.
 
162
Script to enrol a user in an offering.
176
163
 
177
164
.. cmdoption:: <LOGIN>
178
165
 
179
 
    Login of the user to enrol
 
166
    The login of the user to enrol.
180
167
 
181
168
.. cmdoption:: <SUBJECTCODE>
182
169
 
183
 
    Subject code
 
170
    The subject code of the offering.
184
171
 
185
172
.. cmdoption:: <YEAR>
186
173
 
187
 
    Offering year
 
174
    The year of the offering.
188
175
 
189
176
.. cmdoption:: <SEMESTER>
190
177
 
191
 
    Offering semester
 
178
    The semester of the offering
192
179
 
193
180
.. cmdoption:: [ROLE]
194
181
 
195
 
    Role of the user. Should be one of 'student' (default), 'tutor' or
 
182
    Set the role of the user. Should be one of 'student' (default), 'tutor' or 
196
183
    'lecturer'.
197
184
 
198
185
 
203
190
 
204
191
:program:`ivle-enrolallusers`
205
192
 
206
 
Adds enrolments for all users on the system.
 
193
Script to add enrolments for all users on the system.
207
194
Pulls from the configured :ref:`subject pulldown module 
208
195
<ref-subject-pulldown-modules>` the subjects each student
209
196
is enrolled in, and adds enrolments to the database.
210
197
Does not remove any enrolments.
211
198
 
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.
 
199
Requires root to run.
215
200
 
216
201
.. cmdoption:: -u <LOGIN>, --user <LOGIN>
217
202
 
221
206
 
222
207
    Print out the details of each enrolment.
223
208
 
 
209
.. cmdoption:: -y, --year
 
210
 
 
211
    If specified, year to make enrolments for (default is the current year)
 
212
 
224
213
 
225
214
ivle-fetchsubmissions
226
215
---------------------
227
216
 
228
217
.. program:: ivle-fetchsubmissions
229
218
 
230
 
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECT>`
 
219
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECTNAME>`
231
220
 
232
221
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
 
222
own directory, in a subdirectory of '.'. Any errors are reported to stderr 
234
223
(otherwise is silent).
235
224
 
236
 
.. note::
237
 
    Since this script accesses Subversion repositories through the
238
 
    filesystem, it must be run on the master server.
 
225
Requires root to run.
239
226
 
240
227
.. cmdoption:: <SUBJECT>
241
228
 
242
 
    Subject short (URL) name
 
229
    The short name given to the subject
243
230
 
244
231
.. cmdoption:: <PROJECTNAME>
245
232
 
246
 
    Project short (URL) name
 
233
    The name of the project to retrieve.
247
234
 
248
235
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
249
236
 
250
 
    Semester of the offering (eg. 2009/1). Defaults to the currently
 
237
    Semester of the subject's offering (eg. 2009/1). Defaults to the currently 
251
238
    active semester.
252
239
 
253
240
.. cmdoption:: -d <PATH>, --dest <PATH>
254
241
 
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``.
 
242
    Destination directory (defaults to '.') to place submissions. Will create 
 
243
    subdirectories in this directory of the form 
 
244
    ``subject/year/semester/project``.
258
245
 
259
246
.. cmdoption:: -z, --zip
260
247
 
262
249
 
263
250
.. cmdoption:: -v, --verbose
264
251
 
265
 
    Print the name of each submission as it is extracted.
 
252
    Print out the name of each submission as it is extracted.
266
253
 
267
254
.. cmdoption:: --no-txt
268
255
 
276
263
 
277
264
:program:`ivle-listusers [OPTIONS]`
278
265
 
279
 
Lists all users in the IVLE database.
 
266
Gets a list of all users in the IVLE database.
 
267
 
 
268
Requires root to run.
280
269
 
281
270
.. cmdoption:: -n, --names
282
271
 
283
 
    Print only each user's login name
 
272
    Only prints the logins of users
284
273
 
285
274
 
286
275
ivle-marks
292
281
 
293
282
Reports each student's marks for a given subject offering.
294
283
 
 
284
Requires root to run.
 
285
 
295
286
.. cmdoption:: <SUBJECT>
296
287
 
297
 
    Subject short (URL) name
 
288
    The short name given to the subject
298
289
 
299
290
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
300
291
 
301
 
    Semester of the offering (eg. 2009/1). Defaults to the currently
 
292
    Semester of the subject's offering (eg. 2009/1). Defaults to the currently 
302
293
    active semester.
303
294
 
304
295
.. cmdoption:: -c <CUTOFF>, --cutoff <CUTOFF>
318
309
 
319
310
.. note::
320
311
 
321
 
    Administrators should not need to manually run this script for regular
322
 
    operation.  IVLE will automatically mount users' jails on demand.
 
312
    Administrators should not be required to manually run this script for 
 
313
    regular operation.  IVLE will automatically mount user's jails on demand.
 
314
 
 
315
Requires root to run.
323
316
 
324
317
.. cmdoption:: -v, --verbose
325
318
 
326
 
    Print a message for each mount or unmount.
 
319
    Prints the details of each user's jail being mounted/unmounted
327
320
 
328
321
.. cmdoption:: -u, --unmount
329
322
 
337
330
 
338
331
:program:`ivle-refreshfilesystem`
339
332
 
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.
 
333
Refresh parts of the filesystem that are generated from the database.
 
334
 
 
335
In particular, the Subversion authorisation files are rewritten.
359
336
 
360
337
 
361
338
ivle-remakeuser
367
344
 
368
345
:program:`ivle-remakeuser [OPTIONS] -a`
369
346
 
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.
 
347
Rebuilds the Jail of a user or all users in IVLE. This will not delete the 
 
348
data of the users being rebuilt.
 
349
 
 
350
Requires root to run.
373
351
 
374
352
.. cmdoption:: <USER>
375
353
 
376
 
    Login of the user whose jail should be rebuilt
 
354
    Login of the user whose Jail will be rebuilt.
 
355
 
 
356
.. cmdoption:: -v, --verbose
 
357
 
 
358
    Prints the details of each user's jail being remade.
377
359
 
378
360
.. cmdoption:: -a, --all
379
361
 
380
 
    Rebuild the jail of every user
381
 
 
382
 
.. cmdoption:: -v, --verbose
383
 
 
384
 
    Print a message as each user's jail is remade
 
362
    Rebuild all users Jails.
385
363
 
386
364
 
387
365
ivle-showenrolment
392
370
:program:`ivle-showenrolment <USER>`
393
371
 
394
372
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.
 
373
semester and role the user has in each subject they are enrolled in.
 
374
 
 
375
Requires root to run.
396
376
 
397
377
.. cmdoption:: <USER>
398
378
 
399
 
    Login of the user
 
379
    Login of the user to view enrolments details.