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

« back to all changes in this revision

Viewing changes to doc/man/scripts.rst

  • Committer: William Grant
  • Date: 2009-06-24 10:47:38 UTC
  • mfrom: (1288 trunk)
  • mto: (1281.1.8 aufsless)
  • mto: This revision was merged to the branch mainline in revision 1300.
  • Revision ID: grantw@unimelb.edu.au-20090624104738-ezgfy17mjzwz09i3
MergeĀ fromĀ trunk.

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
 
.. note::
57
 
    Admins may create users from the Users page of the web interface.
58
 
 
59
 
.. cmdoption:: <LOGIN>
60
 
 
61
 
    Login name of the new user
62
 
 
63
 
.. cmdoption:: <FULLNAME>
64
 
 
65
 
    Full name of the user
66
 
 
67
 
.. cmdoption:: -p <PASSWORD>, --password <PASSWORD>
68
 
 
69
 
    Cleartext password. If omitted, external authentication mechanisms
70
 
    will be tried.
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
 
 
86
 
    Give the user global IVLE administrative privileges
87
 
 
88
 
 
89
 
ivle-buildjail
90
 
--------------
91
 
 
92
 
.. program:: ivle-buildjail
93
 
 
94
 
:program:`ivle-buildjail [OPTIONS]`
95
 
 
96
 
Creates or updates the IVLE jail template. 
97
 
 
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
 
 
113
 
    Sets the APT mirror. May also be specified in the ``jail/mirror``
114
 
    config key.
115
 
 
116
 
 
117
 
ivle-cloneworksheets
118
 
--------------------
119
 
 
120
 
.. program:: ivle-cloneworksheets
121
 
 
122
 
:program:`ivle-cloneworksheets <OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER> 
123
 
<NEWSUBJECTCODE> <NEWYEAR> <NEWSEMESTER>`
124
 
 
125
 
Populates the offering specified by ``<NEWSUBJECTCODE> <NEWYEAR> 
126
 
<NEWSEMESTER>`` with a copy of the worksheets from the offering specified by 
127
 
``<OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER>``.
128
 
 
129
 
.. note::
130
 
    Admins may also clone worksheets from the offering administration panel
131
 
    in the web interface.
132
 
 
133
 
 
134
 
ivle-config
135
 
-----------
136
 
 
137
 
.. program:: ivle-config
138
 
 
139
 
:program:`ivle-config [ARG1] [ARG2] ...`
140
 
 
141
 
Configures IVLE with machine-specific details, most notably various paths.
142
 
Either prompts the administrator for these details or accepts them as
143
 
command line arguments.
144
 
 
145
 
Command line arguments may be any of the :ref:`configuration option 
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
 
 
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.
154
 
 
155
 
 
156
 
ivle-createdatadirs
157
 
-------------------
158
 
 
159
 
.. program:: ivle-createdatadirs
160
 
 
161
 
:program:`ivle-createdatadirs`
162
 
 
163
 
Creates the IVLE data hierarchy (by default under :file:`/var/lib/ivle`) if
164
 
it does not already exist.
165
 
 
166
 
 
167
 
ivle-enrol
168
 
----------
169
 
 
170
 
.. program:: ivle-enrol
171
 
 
172
 
:program:`ivle-enrol <LOGIN> <SUBJECTCODE> <YEAR> <SEMESTER> [ROLE]`
173
 
 
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.
179
 
 
180
 
.. cmdoption:: <LOGIN>
181
 
 
182
 
    Login of the user to enrol
183
 
 
184
 
.. cmdoption:: <SUBJECTCODE>
185
 
 
186
 
    Subject code
187
 
 
188
 
.. cmdoption:: <YEAR>
189
 
 
190
 
    Offering year
191
 
 
192
 
.. cmdoption:: <SEMESTER>
193
 
 
194
 
    Offering semester
195
 
 
196
 
.. cmdoption:: [ROLE]
197
 
 
198
 
    Role of the user. Should be one of 'student' (default), 'tutor' or
199
 
    'lecturer'.
200
 
 
201
 
 
202
 
ivle-enrolallusers
203
 
------------------
204
 
 
205
 
.. program:: ivle-enrolallusers
206
 
 
207
 
:program:`ivle-enrolallusers`
208
 
 
209
 
Adds enrolments for all users on the system.
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
 
 
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.
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
 
 
233
 
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECT>`
234
 
 
235
 
Retrieves all submissions for a given project. Places each submission in its 
236
 
own subdirectory of the current directory. Any errors are reported to stderr
237
 
(otherwise is silent).
238
 
 
239
 
.. note::
240
 
    Since this script accesses Subversion repositories through the
241
 
    filesystem, it must be run on the master server.
242
 
 
243
 
.. cmdoption:: <SUBJECT>
244
 
 
245
 
    Subject short (URL) name
246
 
 
247
 
.. cmdoption:: <PROJECTNAME>
248
 
 
249
 
    Project short (URL) name
250
 
 
251
 
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
252
 
 
253
 
    Semester of the offering (eg. 2009/1). Defaults to the currently
254
 
    active semester.
255
 
 
256
 
.. cmdoption:: -d <PATH>, --dest <PATH>
257
 
 
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``.
261
 
 
262
 
.. cmdoption:: -z, --zip
263
 
 
264
 
    Store each submission in a Zip file.
265
 
 
266
 
.. cmdoption:: -v, --verbose
267
 
 
268
 
    Print the name of each submission as it is extracted.
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
 
 
282
 
Lists all users in the IVLE database.
283
 
 
284
 
.. note::
285
 
    Users may also be listed and administered through the web interface,
286
 
    from the *Users* item in the IVLE menu.
287
 
 
288
 
.. cmdoption:: -n, --names
289
 
 
290
 
    Print only each user's login name
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
 
 
304
 
    Administrators should not need to manually run this script for regular
305
 
    operation.  IVLE will automatically mount users' jails on demand.
306
 
 
307
 
.. cmdoption:: -v, --verbose
308
 
 
309
 
    Print a message for each mount or unmount.
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
 
 
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.
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
 
 
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.
356
 
 
357
 
.. cmdoption:: <USER>
358
 
 
359
 
    Login of the user whose jail should be rebuilt
360
 
 
361
 
.. cmdoption:: -a, --all
362
 
 
363
 
    Rebuild the jail of every user
364
 
 
365
 
.. cmdoption:: -v, --verbose
366
 
 
367
 
    Print a message as each user's jail is remade
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, 
378
 
semester and the held role for each subject in which they are enrolled.
379
 
 
380
 
.. cmdoption:: <USER>
381
 
 
382
 
    Login of the user