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>``.
134
.. program:: ivle-config
136
:program:`ivle-config [ARG1] [ARG2] ...`
138
Configures IVLE with machine-specific details, most notably various paths.
139
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
143
<ref-configuration-options>` used in :file:`ivle.conf`. They are provided in
144
the form of :samp:`--{section}/{subsection}/{property} {VALUE}` such as
145
``--urls/root ivle.org`` or ``--media/externals/jquery
146
/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
156
.. program:: ivle-createdatadirs
158
:program:`ivle-createdatadirs`
160
Creates the IVLE data hierarchy (by default under :file:`/var/lib/ivle`) if
161
it does not already exist.
167
.. program:: ivle-enrol
169
: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.
177
.. cmdoption:: <LOGIN>
179
Login of the user to enrol
181
.. cmdoption:: <SUBJECTCODE>
185
.. cmdoption:: <YEAR>
189
.. cmdoption:: <SEMESTER>
193
.. cmdoption:: [ROLE]
195
Role of the user. Should be one of 'student' (default), 'tutor' or
202
.. program:: ivle-enrolallusers
204
:program:`ivle-enrolallusers`
206
Adds enrolments for all users on the system.
207
Pulls from the configured :ref:`subject pulldown module
208
<ref-subject-pulldown-modules>` the subjects each student
209
is enrolled in, and adds enrolments to the database.
210
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.
216
.. cmdoption:: -u <LOGIN>, --user <LOGIN>
218
Just perform enrolment for user ``<LOGIN>``
220
.. cmdoption:: -v, --verbose
222
Print out the details of each enrolment.
225
ivle-fetchsubmissions
226
---------------------
228
.. program:: ivle-fetchsubmissions
230
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECT>`
232
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
234
(otherwise is silent).
237
Since this script accesses Subversion repositories through the
238
filesystem, it must be run on the master server.
240
.. cmdoption:: <SUBJECT>
242
Subject short (URL) name
244
.. cmdoption:: <PROJECTNAME>
246
Project short (URL) name
248
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
250
Semester of the offering (eg. 2009/1). Defaults to the currently
253
.. 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``.
259
.. cmdoption:: -z, --zip
261
Store each submission in a Zip file.
263
.. cmdoption:: -v, --verbose
265
Print the name of each submission as it is extracted.
267
.. cmdoption:: --no-txt
269
Disable writing a text file with metadata about each submission.
275
.. program:: ivle-listusers
277
:program:`ivle-listusers [OPTIONS]`
279
Lists all users in the IVLE database.
281
.. cmdoption:: -n, --names
283
Print only each user's login name
289
.. program:: ivle-marks
291
:program:`ivle-marks [OPTIONS] <SUBJECT>`
293
Reports each student's marks for a given subject offering.
295
.. cmdoption:: <SUBJECT>
297
Subject short (URL) name
299
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
301
Semester of the offering (eg. 2009/1). Defaults to the currently
304
.. cmdoption:: -c <CUTOFF>, --cutoff <CUTOFF>
306
Cutoff date (calculate the marks as of this date). Should be provided in
307
the form of ``YYYY-MM-DD H:M:S``.
313
.. program:: ivle-mountallusers
315
:program:`ivle-mountallusers`
317
Attempts to mount the jails of all users.
321
Administrators should not need to manually run this script for regular
322
operation. IVLE will automatically mount users' jails on demand.
324
.. cmdoption:: -v, --verbose
326
Print a message for each mount or unmount.
328
.. cmdoption:: -u, --unmount
330
Unmount jails instead of mounting them.
333
ivle-refreshfilesystem
334
----------------------
336
.. program:: ivle-refreshfilesystem
338
: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.
364
.. program:: ivle-remakeuser
366
:program:`ivle-remakeuser [OPTIONS] <USER>`
368
: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.
374
.. cmdoption:: <USER>
376
Login of the user whose jail should be rebuilt
378
.. 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
390
.. program:: ivle-showenrolment
392
:program:`ivle-showenrolment <USER>`
394
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.
397
.. cmdoption:: <USER>