24
IVLE has a number of Admin scripts to configure IVLE or for functionality not
25
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.
27
Most of these script are required to be run as root.
27
Most of these scripts must be run as root.
34
34
:program:`ivle-addexercise <EXERCISE>`
36
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.
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.
38
42
.. cmdoption:: <EXERCISE>
47
51
:program:`ivle-adduser [OPTIONS] <LOGIN> <FULLNAME>`
49
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.
51
56
.. FIXME: "This can also be done through the administration interface."
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)
58
60
.. cmdoption:: <LOGIN>
60
The login name of the new user
62
Login name of the new user
62
64
.. cmdoption:: <FULLNAME>
64
The full name of the user
66
68
.. cmdoption:: -p <PASSWORD>, --password <PASSWORD>
70
Cleartext password. If omitted, external authentication mechanisms
70
73
.. cmdoption:: -n <NICK>, --nick <NICK>
92
95
:program:`ivle-buildjail [OPTIONS]`
97
Creates or updates the IVLE jail template.
94
99
.. cmdoption:: -r, --recreate
96
101
Completely recreate the jail - don't just update its IVLE code.
117
123
:program:`ivle-cloneworksheets <OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER>
118
124
<NEWSUBJECTCODE> <NEWYEAR> <NEWSEMESTER>`
120
Populates the subject specified by ``<NEWSUBJECTCODE> <NEWYEAR>
121
<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
122
128
``<OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER>``.
130
136
:program:`ivle-config [ARG1] [ARG2] ...`
132
Configures IVLE with machine-specific details, most notably, various paths.
138
Configures IVLE with machine-specific details, most notably various paths.
133
139
Either prompts the administrator for these details or accepts them as
140
command line arguments.
136
Command-line arguments may be any of the :ref:`configuration option
142
Command line arguments may be any of the :ref:`configuration option
137
143
<ref-configuration-options>` used in :file:`ivle.conf`. They are provided in
138
144
the form of :samp:`--{section}/{subsection}/{property} {VALUE}` such as
139
145
``--urls/root ivle.org`` or ``--media/externals/jquery
140
146
/usr/share/javascript/jquery``.
142
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
145
153
ivle-createdatadirs
160
169
:program:`ivle-enrol <LOGIN> <SUBJECTCODE> <YEAR> <SEMESTER> [ROLE]`
162
Script to enrol a user in an offering.
171
Enrols a user in an offering.
174
Users may also be enrolled from the offering administration panel
175
in the web interface.
164
177
.. cmdoption:: <LOGIN>
166
The login of the user to enrol.
179
Login of the user to enrol
168
181
.. cmdoption:: <SUBJECTCODE>
170
The subject code of the offering.
172
185
.. cmdoption:: <YEAR>
174
The year of the offering.
176
189
.. cmdoption:: <SEMESTER>
178
The semester of the offering
180
193
.. cmdoption:: [ROLE]
182
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
191
204
:program:`ivle-enrolallusers`
193
Script to add enrolments for all users on the system.
206
Adds enrolments for all users on the system.
194
207
Pulls from the configured :ref:`subject pulldown module
195
208
<ref-subject-pulldown-modules>` the subjects each student
196
209
is enrolled in, and adds enrolments to the database.
197
210
Does not remove any enrolments.
199
Requires root to run.
213
Pulldown modules are consulted for each user each time they log in,
214
so use of this script may not be required.
201
216
.. cmdoption:: -u <LOGIN>, --user <LOGIN>
207
222
Print out the details of each enrolment.
209
.. cmdoption:: -y, --year
211
If specified, year to make enrolments for (default is the current year)
214
225
ivle-fetchsubmissions
215
226
---------------------
217
228
.. program:: ivle-fetchsubmissions
219
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECTNAME>`
230
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECT>`
221
232
Retrieves all submissions for a given project. Places each submission in its
222
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
223
234
(otherwise is silent).
225
Requires root to run.
237
Since this script accesses Subversion repositories through the
238
filesystem, it must be run on the master server.
227
240
.. cmdoption:: <SUBJECT>
229
The short name given to the subject
242
Subject short (URL) name
231
244
.. cmdoption:: <PROJECTNAME>
233
The name of the project to retrieve.
246
Project short (URL) name
235
248
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
237
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
240
253
.. cmdoption:: -d <PATH>, --dest <PATH>
242
Destination directory (defaults to '.') to place submissions. Will create
243
subdirectories in this directory of the form
244
``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``.
246
259
.. cmdoption:: -z, --zip
264
277
:program:`ivle-listusers [OPTIONS]`
266
Gets a list of all users in the IVLE database.
268
Requires root to run.
279
Lists all users in the IVLE database.
270
281
.. cmdoption:: -n, --names
272
Only prints the logins of users
283
Print only each user's login name
282
293
Reports each student's marks for a given subject offering.
284
Requires root to run.
286
295
.. cmdoption:: <SUBJECT>
288
The short name given to the subject
297
Subject short (URL) name
290
299
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
292
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
295
304
.. cmdoption:: -c <CUTOFF>, --cutoff <CUTOFF>
312
Administrators should not be required to manually run this script for
313
regular operation. IVLE will automatically mount user's jails on demand.
315
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.
317
324
.. cmdoption:: -v, --verbose
319
Prints the details of each user's jail being mounted/unmounted
326
Print a message for each mount or unmount.
321
328
.. cmdoption:: -u, --unmount
331
338
:program:`ivle-refreshfilesystem`
333
Refresh parts of the filesystem that are generated from the database.
335
In particular, the Subversion authorisation files are rewritten.
340
Refresh parts of the filesystem to match the database.
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
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.
357
Jails and Subversion repositories are not entirely removed. They
358
can be found in a timestamped directory alongside their parent.
345
368
:program:`ivle-remakeuser [OPTIONS] -a`
347
Rebuilds the Jail of a user or all users in IVLE. This will not delete the
348
data of the users being rebuilt.
350
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.
352
374
.. cmdoption:: <USER>
354
Login of the user whose Jail will be rebuilt.
356
.. cmdoption:: -v, --verbose
358
Prints the details of each user's jail being remade.
376
Login of the user whose jail should be rebuilt
360
378
.. cmdoption:: -a, --all
362
Rebuild all users Jails.
380
Rebuild the jail of every user
382
.. cmdoption:: -v, --verbose
384
Print a message as each user's jail is remade
365
387
ivle-showenrolment
370
392
:program:`ivle-showenrolment <USER>`
372
394
Shows the enrolments of a user. Prints subject code, subject name, year,
373
semester and role the user has in each subject they are enrolled in.
375
Requires root to run.
395
semester and the held role for each subject in which they are enrolled.
377
397
.. cmdoption:: <USER>
379
Login of the user to view enrolments details.