~azzar1/unity/add-show-desktop-key

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
.. IVLE - Informatics Virtual Learning Environment
   Copyright (C) 2007-2009 The University of Melbourne

.. This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

.. This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

.. You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

.. _ref-admin-scripts:

*************
Admin scripts
*************

IVLE has a number of Admin scripts to configure IVLE or for functionality not  
directly in the web application.

Most of these script are required to be run as root.

ivle-addexercise
----------------

.. program:: ivle-addexercise

:program:`ivle-addexercise <EXERCISE>`

Adds an XML encoded exercise to the IVLE database.

.. cmdoption:: <EXERCISE>

    The XML file containing the exercise to be uploaded.

ivle-adduser
------------

.. program:: ivle-adduser

:program:`ivle-adduser [OPTIONS] <LOGIN> <FULLNAME>`

Script to create a new user.

.. FIXME: "This can also be done through the administration interface."
    (Not yet!)

This script wraps common.makeuser. It also creates a unix account which 
common.makeuser does not. (This script may not be appropriate for production 
on a multi-node environment)

.. cmdoption:: <LOGIN>

    The login name of the new user

.. cmdoption:: <FULLNAME>

    The full name of the user

.. cmdoption:: -p <PASSWORD>, --password <PASSWORD>

    Cleartext password

.. cmdoption:: -n <NICK>, --nick <NICK>

    Display name (defaults to <FULLNAME>)

.. cmdoption:: -e <EMAIL>, --email <EMAIL>

    Email address

.. cmdoption:: -s <SID>, --studentid <SID>

    Student ID

.. cmdoption:: --admin

    Give the user full administrative privileges


ivle-buildjail
--------------

.. program:: ivle-buildjail

:program:`ivle-buildjail [OPTIONS]`

.. cmdoption:: -r, --recreate

    Completely recreate the jail - don't just update its IVLE code.

    .. warning::

        This may download hundreds of megabytes from the location specified by 
        ``<MIRROR>``.

.. cmdoption:: -u, --upgrade

    Apply any package updates in the jail.

.. cmdoption:: -m <MIRROR>, --mirror <MIRROR>

    Sets the APT mirror.


ivle-cloneworksheets
--------------------

.. program:: ivle-cloneworksheets

:program:`ivle-cloneworksheets <OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER> 
<NEWSUBJECTCODE> <NEWYEAR> <NEWSEMESTER>`

Populates the subject specified by ``<NEWSUBJECTCODE> <NEWYEAR> 
<NEWSEMESTER>`` with a copy of the worksheets from the subject specified by 
``<OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER>``.


ivle-config
-----------

.. program:: ivle-config

:program:`ivle-config [ARG1] [ARG2] ...`

Configures IVLE with machine-specific details, most notably, various paths.
Either prompts the administrator for these details or accepts them as
command-line args.

Command-line arguments may be any of the :ref:`configuration option 
<ref-configuration-options>` used in :file:`ivle.conf`. They are provided in 
the form of :samp:`--{section}/{subsection}/{property} {VALUE}` such as 
``--urls/root ivle.org`` or ``--media/externals/jquery 
/usr/share/javascript/jquery``.

Automatically creates the file :file:`/etc/ivle.conf`.


ivle-createdatadirs
-------------------

.. program:: ivle-createdatadirs

:program:`ivle-createdatadirs`

Creates an IVLE data hierarchy if it does not already exist.


ivle-enrol
----------

.. program:: ivle-enrol

:program:`ivle-enrol <LOGIN> <SUBJECTCODE> <YEAR> <SEMESTER> [ROLE]`

Script to enrol a user in an offering.

.. cmdoption:: <LOGIN>

    The login of the user to enrol.

.. cmdoption:: <SUBJECTCODE>

    The subject code of the offering.

.. cmdoption:: <YEAR>

    The year of the offering.

.. cmdoption:: <SEMESTER>

    The semester of the offering

.. cmdoption:: [ROLE]

    Set the role of the user. Should be one of 'student' (default), 'tutor' or 
    'lecturer'.


ivle-enrolallusers
------------------

.. program:: ivle-enrolallusers

:program:`ivle-enrolallusers`

Script to add enrolments for all users on the system.
Pulls from the configured :ref:`subject pulldown module 
<ref-subject-pulldown-modules>` the subjects each student
is enrolled in, and adds enrolments to the database.
Does not remove any enrolments.

Requires root to run.

.. cmdoption:: -u <LOGIN>, --user <LOGIN>

    Just perform enrolment for user ``<LOGIN>``

.. cmdoption:: -v, --verbose

    Print out the details of each enrolment.

.. cmdoption:: -y, --year

    If specified, year to make enrolments for (default is the current year)


ivle-fetchsubmissions
---------------------

.. program:: ivle-fetchsubmissions

:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECTNAME>`

Retrieves all submissions for a given project. Places each submission in its 
own directory, in a subdirectory of '.'. Any errors are reported to stderr 
(otherwise is silent).

Requires root to run.

.. cmdoption:: <SUBJECT>

    The short name given to the subject

.. cmdoption:: <PROJECTNAME>

    The name of the project to retrieve.

.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>

    Semester of the subject's offering (eg. 2009/1). Defaults to the currently 
    active semester.

.. cmdoption:: -d <PATH>, --dest <PATH>

    Destination directory (defaults to '.') to place submissions. Will create 
    subdirectories in this directory of the form 
    ``subject/year/semester/project``.

.. cmdoption:: -z, --zip

    Store each submission in a Zip file.

.. cmdoption:: -v, --verbose

    Print out the name of each submission as it is extracted.

.. cmdoption:: --no-txt

    Disable writing a text file with metadata about each submission.


ivle-listusers
--------------

.. program:: ivle-listusers

:program:`ivle-listusers [OPTIONS]`

Gets a list of all users in the IVLE database.

Requires root to run.

.. cmdoption:: -n, --names

    Only prints the logins of users


ivle-marks
----------

.. program:: ivle-marks

:program:`ivle-marks [OPTIONS] <SUBJECT>`

Reports each student's marks for a given subject offering.

Requires root to run.

.. cmdoption:: <SUBJECT>

    The short name given to the subject

.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>

    Semester of the subject's offering (eg. 2009/1). Defaults to the currently 
    active semester.

.. cmdoption:: -c <CUTOFF>, --cutoff <CUTOFF>

    Cutoff date (calculate the marks as of this date). Should be provided in 
    the form of ``YYYY-MM-DD H:M:S``.


ivle-mountallusers
------------------

.. program:: ivle-mountallusers

:program:`ivle-mountallusers`

Attempts to mount the jails of all users.

.. note::

    Administrators should not be required to manually run this script for 
    regular operation.  IVLE will automatically mount user's jails on demand.

Requires root to run.

.. cmdoption:: -v, --verbose

    Prints the details of each user's jail being mounted/unmounted

.. cmdoption:: -u, --unmount

    Unmount jails instead of mounting them.


ivle-refreshfilesystem
----------------------

.. program:: ivle-refreshfilesystem

:program:`ivle-refreshfilesystem`

Refresh parts of the filesystem that are generated from the database.

In particular, the Subversion authorisation files are rewritten.


ivle-remakeuser
---------------

.. program:: ivle-remakeuser

:program:`ivle-remakeuser [OPTIONS] <USER>`

:program:`ivle-remakeuser [OPTIONS] -a`

Rebuilds the Jail of a user or all users in IVLE. This will not delete the 
data of the users being rebuilt.

Requires root to run.

.. cmdoption:: <USER>

    Login of the user whose Jail will be rebuilt.

.. cmdoption:: -v, --verbose

    Prints the details of each user's jail being remade.

.. cmdoption:: -a, --all

    Rebuild all users Jails.


ivle-showenrolment
------------------

.. program:: ivle-showenrolment

:program:`ivle-showenrolment <USER>`

Shows the enrolments of a user. Prints subject code, subject name, year, 
semester and role the user has in each subject they are enrolled in.

Requires root to run.

.. cmdoption:: <USER>

    Login of the user to view enrolments details.