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
18
.. _ref-admin-scripts:
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.
25
Most of these script are required to be run as root.
27
Most of these scripts must be run as root.
32
34
:program:`ivle-addexercise <EXERCISE>`
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.
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
42
.. cmdoption:: <EXERCISE>
45
51
:program:`ivle-adduser [OPTIONS] <LOGIN> <FULLNAME>`
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.
49
56
.. FIXME: "This can also be done through the administration interface."
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)
56
60
.. cmdoption:: <LOGIN>
58
The login name of the new user
62
Login name of the new user
60
64
.. cmdoption:: <FULLNAME>
62
The full name of the user
64
68
.. cmdoption:: -p <PASSWORD>, --password <PASSWORD>
70
Cleartext password. If omitted, external authentication mechanisms
68
73
.. cmdoption:: -n <NICK>, --nick <NICK>
90
95
:program:`ivle-buildjail [OPTIONS]`
97
Creates or updates the IVLE jail template.
92
99
.. cmdoption:: -r, --recreate
94
101
Completely recreate the jail - don't just update its IVLE code.
115
123
:program:`ivle-cloneworksheets <OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER>
116
124
<NEWSUBJECTCODE> <NEWYEAR> <NEWSEMESTER>`
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>``.
128
136
:program:`ivle-config [ARG1] [ARG2] ...`
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
140
command line arguments.
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``.
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
143
153
ivle-createdatadirs
158
169
:program:`ivle-enrol <LOGIN> <SUBJECTCODE> <YEAR> <SEMESTER> [ROLE]`
160
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.
162
177
.. cmdoption:: <LOGIN>
164
The login of the user to enrol.
179
Login of the user to enrol
166
181
.. cmdoption:: <SUBJECTCODE>
168
The subject code of the offering.
170
185
.. cmdoption:: <YEAR>
172
The year of the offering.
174
189
.. cmdoption:: <SEMESTER>
176
The semester of the offering
178
193
.. cmdoption:: [ROLE]
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
189
204
:program:`ivle-enrolallusers`
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.
197
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.
199
216
.. cmdoption:: -u <LOGIN>, --user <LOGIN>
205
222
Print out the details of each enrolment.
207
.. cmdoption:: -y, --year
209
If specified, year to make enrolments for (default is the current year)
212
225
ivle-fetchsubmissions
213
226
---------------------
215
228
.. program:: ivle-fetchsubmissions
217
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECTNAME>`
230
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECT>`
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).
223
Requires root to run.
237
Since this script accesses Subversion repositories through the
238
filesystem, it must be run on the master server.
225
240
.. cmdoption:: <SUBJECT>
227
The short name given to the subject
242
Subject short (URL) name
229
244
.. cmdoption:: <PROJECTNAME>
231
The name of the project to retrieve.
246
Project short (URL) name
233
248
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
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
238
253
.. cmdoption:: -d <PATH>, --dest <PATH>
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``.
244
259
.. cmdoption:: -z, --zip
262
277
:program:`ivle-listusers [OPTIONS]`
264
Gets a list of all users in the IVLE database.
266
Requires root to run.
279
Lists all users in the IVLE database.
268
281
.. cmdoption:: -n, --names
270
Only prints the logins of users
283
Print only each user's login name
280
293
Reports each student's marks for a given subject offering.
282
Requires root to run.
284
295
.. cmdoption:: <SUBJECT>
286
The short name given to the subject
297
Subject short (URL) name
288
299
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
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
293
304
.. cmdoption:: -c <CUTOFF>, --cutoff <CUTOFF>
310
Administrators should not be required to manually run this script for
311
regular operation. IVLE will automatically mount user's jails on demand.
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.
315
324
.. cmdoption:: -v, --verbose
317
Prints the details of each user's jail being mounted/unmounted
326
Print a message for each mount or unmount.
319
328
.. cmdoption:: -u, --unmount
329
338
:program:`ivle-refreshfilesystem`
331
Refresh parts of the filesystem that are generated from the database.
333
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.
343
368
:program:`ivle-remakeuser [OPTIONS] -a`
345
Rebuilds the Jail of a user or all users in IVLE. This will not delete the
346
data of the users being rebuilt.
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.
350
374
.. cmdoption:: <USER>
352
Login of the user whose Jail will be rebuilt.
354
.. cmdoption:: -v, --verbose
356
Prints the details of each user's jail being remade.
376
Login of the user whose jail should be rebuilt
358
378
.. cmdoption:: -a, --all
360
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
363
387
ivle-showenrolment
368
392
:program:`ivle-showenrolment <USER>`
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.
373
Requires root to run.
395
semester and the held role for each subject in which they are enrolled.
375
397
.. cmdoption:: <USER>
377
Login of the user to view enrolments details.