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.
27
Most of these scripts must be run as root.
27
Most of these script are required to be run as root.
34
34
:program:`ivle-addexercise <EXERCISE>`
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.
36
Adds an XML encoded exercise to the IVLE database.
42
38
.. cmdoption:: <EXERCISE>
51
47
:program:`ivle-adduser [OPTIONS] <LOGIN> <FULLNAME>`
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.
56
51
.. 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)
60
58
.. cmdoption:: <LOGIN>
62
Login name of the new user
60
The login name of the new user
64
62
.. cmdoption:: <FULLNAME>
64
The full name of the user
68
66
.. cmdoption:: -p <PASSWORD>, --password <PASSWORD>
70
Cleartext password. If omitted, external authentication mechanisms
73
70
.. cmdoption:: -n <NICK>, --nick <NICK>
95
92
:program:`ivle-buildjail [OPTIONS]`
97
Creates or updates the IVLE jail template.
99
94
.. cmdoption:: -r, --recreate
101
96
Completely recreate the jail - don't just update its IVLE code.
123
117
:program:`ivle-cloneworksheets <OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER>
124
118
<NEWSUBJECTCODE> <NEWYEAR> <NEWSEMESTER>`
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>``.
136
130
:program:`ivle-config [ARG1] [ARG2] ...`
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.
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``.
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
142
Automatically creates the file :file:`/etc/ivle.conf`.
153
145
ivle-createdatadirs
169
160
:program:`ivle-enrol <LOGIN> <SUBJECTCODE> <YEAR> <SEMESTER> [ROLE]`
171
Enrols a user in an offering.
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.
177
164
.. cmdoption:: <LOGIN>
179
Login of the user to enrol
166
The login of the user to enrol.
181
168
.. cmdoption:: <SUBJECTCODE>
170
The subject code of the offering.
185
172
.. cmdoption:: <YEAR>
174
The year of the offering.
189
176
.. cmdoption:: <SEMESTER>
178
The semester of the offering
193
180
.. cmdoption:: [ROLE]
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
204
191
:program:`ivle-enrolallusers`
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.
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.
216
201
.. cmdoption:: -u <LOGIN>, --user <LOGIN>
222
207
Print out the details of each enrolment.
209
.. cmdoption:: -y, --year
211
If specified, year to make enrolments for (default is the current year)
225
214
ivle-fetchsubmissions
226
215
---------------------
228
217
.. program:: ivle-fetchsubmissions
230
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECT>`
219
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECTNAME>`
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).
237
Since this script accesses Subversion repositories through the
238
filesystem, it must be run on the master server.
225
Requires root to run.
240
227
.. cmdoption:: <SUBJECT>
242
Subject short (URL) name
229
The short name given to the subject
244
231
.. cmdoption:: <PROJECTNAME>
246
Project short (URL) name
233
The name of the project to retrieve.
248
235
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
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
253
240
.. cmdoption:: -d <PATH>, --dest <PATH>
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``.
259
246
.. cmdoption:: -z, --zip
277
264
:program:`ivle-listusers [OPTIONS]`
279
Lists all users in the IVLE database.
266
Gets a list of all users in the IVLE database.
268
Requires root to run.
281
270
.. cmdoption:: -n, --names
283
Print only each user's login name
272
Only prints the logins of users
293
282
Reports each student's marks for a given subject offering.
284
Requires root to run.
295
286
.. cmdoption:: <SUBJECT>
297
Subject short (URL) name
288
The short name given to the subject
299
290
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
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
304
295
.. cmdoption:: -c <CUTOFF>, --cutoff <CUTOFF>
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.
315
Requires root to run.
324
317
.. cmdoption:: -v, --verbose
326
Print a message for each mount or unmount.
319
Prints the details of each user's jail being mounted/unmounted
328
321
.. cmdoption:: -u, --unmount
338
331
:program:`ivle-refreshfilesystem`
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.
333
Refresh parts of the filesystem that are generated from the database.
335
In particular, the Subversion authorisation files are rewritten.
368
345
:program:`ivle-remakeuser [OPTIONS] -a`
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.
350
Requires root to run.
374
352
.. cmdoption:: <USER>
376
Login of the user whose jail should be rebuilt
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.
378
360
.. cmdoption:: -a, --all
380
Rebuild the jail of every user
382
.. cmdoption:: -v, --verbose
384
Print a message as each user's jail is remade
362
Rebuild all users Jails.
387
365
ivle-showenrolment
392
370
:program:`ivle-showenrolment <USER>`
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.
375
Requires root to run.
397
377
.. cmdoption:: <USER>
379
Login of the user to view enrolments details.