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

« back to all changes in this revision

Viewing changes to doc/man/scripts.rst

  • Committer: Matt Giuca
  • Date: 2010-02-12 04:00:39 UTC
  • Revision ID: matt.giuca@gmail.com-20100212040039-vw9yf8p4s98g6nu9
Added an argument 'config' to every single get_permissions method throughout the program. All calls to get_permissions pass a config. This is to allow per-site policy configurations on permissions.

Show diffs side-by-side

added added

removed removed

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