1
.. IVLE - Informatics Virtual Learning Environment
2
Copyright (C) 2007-2009 The University of Melbourne
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.
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.
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
18
.. _ref-admin-scripts:
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 scripts must be run as root.
32
.. program:: ivle-addexercise
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.
42
.. cmdoption:: <EXERCISE>
44
The XML file containing the exercise to be uploaded.
49
.. program:: ivle-adduser
51
: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.
56
.. FIXME: "This can also be done through the administration interface."
60
.. cmdoption:: <LOGIN>
62
Login name of the new user
64
.. cmdoption:: <FULLNAME>
68
.. cmdoption:: -p <PASSWORD>, --password <PASSWORD>
70
Cleartext password. If omitted, external authentication mechanisms
73
.. cmdoption:: -n <NICK>, --nick <NICK>
75
Display name (defaults to <FULLNAME>)
77
.. cmdoption:: -e <EMAIL>, --email <EMAIL>
81
.. cmdoption:: -s <SID>, --studentid <SID>
85
.. cmdoption:: --admin
87
Give the user global IVLE administrative privileges
93
.. program:: ivle-buildjail
95
:program:`ivle-buildjail [OPTIONS]`
97
Creates or updates the IVLE jail template.
99
.. cmdoption:: -r, --recreate
101
Completely recreate the jail - don't just update its IVLE code.
105
This may download hundreds of megabytes from the location specified by
108
.. cmdoption:: -u, --upgrade
110
Apply any package updates in the jail.
112
.. cmdoption:: -m <MIRROR>, --mirror <MIRROR>
114
Sets the APT mirror. May also be specified in the ``jail/mirror``
121
.. program:: ivle-cloneworksheets
123
:program:`ivle-cloneworksheets <OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER>
124
<NEWSUBJECTCODE> <NEWYEAR> <NEWSEMESTER>`
126
Populates the offering specified by ``<NEWSUBJECTCODE> <NEWYEAR>
127
<NEWSEMESTER>`` with a copy of the worksheets from the offering specified by
128
``<OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER>``.
131
Admins may also clone worksheets from the offering administration panel
132
in the web interface.
138
.. program:: ivle-config
140
:program:`ivle-config [ARG1] [ARG2] ...`
142
Configures IVLE with machine-specific details, most notably various paths.
143
Either prompts the administrator for these details or accepts them as
144
command line arguments.
146
Command line arguments may be any of the :ref:`configuration option
147
<ref-configuration-options>` used in :file:`ivle.conf`. They are provided in
148
the form of :samp:`--{section}/{subsection}/{property} {VALUE}` such as
149
``--urls/root ivle.org`` or ``--media/externals/jquery
150
/usr/share/javascript/jquery``.
152
Creates or updates :file:`/etc/ivle/ivle.conf` with the selected values,
153
and overwrites :file:`/etc/ivle/plugins.d/000default` with the latest
160
.. program:: ivle-createdatadirs
162
:program:`ivle-createdatadirs`
164
Creates the IVLE data hierarchy (by default under :file:`/var/lib/ivle`) if
165
it does not already exist.
171
.. program:: ivle-enrol
173
:program:`ivle-enrol <LOGIN> <SUBJECTCODE> <YEAR> <SEMESTER> [ROLE]`
175
Enrols a user in an offering.
178
Users may also be enrolled from the offering administration panel
179
in the web interface.
181
.. cmdoption:: <LOGIN>
183
Login of the user to enrol
185
.. cmdoption:: <SUBJECTCODE>
189
.. cmdoption:: <YEAR>
193
.. cmdoption:: <SEMESTER>
197
.. cmdoption:: [ROLE]
199
Role of the user. Should be one of 'student' (default), 'tutor' or
206
.. program:: ivle-enrolallusers
208
:program:`ivle-enrolallusers`
210
Adds enrolments for all users on the system.
211
Pulls from the configured :ref:`subject pulldown module
212
<ref-subject-pulldown-modules>` the subjects each student
213
is enrolled in, and adds enrolments to the database.
214
Does not remove any enrolments.
217
Pulldown modules are consulted for each user each time they log in,
218
so use of this script may not be required.
220
.. cmdoption:: -u <LOGIN>, --user <LOGIN>
222
Just perform enrolment for user ``<LOGIN>``
224
.. cmdoption:: -v, --verbose
226
Print out the details of each enrolment.
229
ivle-fetchsubmissions
230
---------------------
232
.. program:: ivle-fetchsubmissions
234
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECT>`
236
Retrieves all submissions for a given project. Places each submission in its
237
own subdirectory of the current directory. Any errors are reported to stderr
238
(otherwise is silent).
241
Since this script accesses Subversion repositories through the
242
filesystem, it must be run on the master server.
244
.. cmdoption:: <SUBJECT>
246
Subject short (URL) name
248
.. cmdoption:: <PROJECTNAME>
250
Project short (URL) name
252
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
254
Semester of the offering (eg. 2009/1). Defaults to the currently
257
.. cmdoption:: -d <PATH>, --dest <PATH>
259
Destination directory (defaults to the current directory) in
260
which to place submissions. Will create subdirectories in this
261
directory of the form ``subject/year/semester/project``.
263
.. cmdoption:: -z, --zip
265
Store each submission in a Zip file.
267
.. cmdoption:: -v, --verbose
269
Print the name of each submission as it is extracted.
271
.. cmdoption:: --no-txt
273
Disable writing a text file with metadata about each submission.
279
.. program:: ivle-listusers
281
:program:`ivle-listusers [OPTIONS]`
283
Lists all users in the IVLE database.
286
Users may also be listed and administered through the web interface,
287
from the *Users* item in the IVLE menu.
289
.. cmdoption:: -n, --names
291
Print only each user's login name
297
.. program:: ivle-mountallusers
299
:program:`ivle-mountallusers`
301
Attempts to mount the jails of all users.
305
Administrators should not need to manually run this script for regular
306
operation. IVLE will automatically mount users' jails on demand.
308
.. cmdoption:: -v, --verbose
310
Print a message for each mount or unmount.
312
.. cmdoption:: -u, --unmount
314
Unmount jails instead of mounting them.
317
ivle-refreshfilesystem
318
----------------------
320
.. program:: ivle-refreshfilesystem
322
:program:`ivle-refreshfilesystem`
324
Refresh parts of the filesystem to match the database.
327
- all jails are rebuilt
328
- missing user jails are created
329
- missing user and group Subversion repositories are created
330
- jails for missing users are removed
331
- Subversion repositories for missing users or groups are removed
332
- the Subversion password file is updated
333
- the Subversion authorisation files are rewritten
336
Due to the full jail rebuilds, existing jail mounts may be broken
337
after this script has run. To recover from this situation, use
338
``ivle-mountallusers`` to unmount all of the jails.
341
Jails and Subversion repositories are not entirely removed. They
342
can be found in a timestamped directory alongside their parent.
348
.. program:: ivle-remakeuser
350
:program:`ivle-remakeuser [OPTIONS] <USER>`
352
:program:`ivle-remakeuser [OPTIONS] -a`
354
Rebuilds the jail of a single user or of all users in IVLE. This will
355
retain all user data, but recreate the rest of the hierarchy and
356
internal configuration files.
358
.. cmdoption:: <USER>
360
Login of the user whose jail should be rebuilt
362
.. cmdoption:: -a, --all
364
Rebuild the jail of every user
366
.. cmdoption:: -v, --verbose
368
Print a message as each user's jail is remade
374
.. program:: ivle-showenrolment
376
:program:`ivle-showenrolment <USER>`
378
Shows the enrolments of a user. Prints subject code, subject name, year,
379
semester and the held role for each subject in which they are enrolled.
381
.. cmdoption:: <USER>