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
24
IVLE comes with supplied sample data to give a quick overview of the system.
25
This sample data may be installed by an administrative script. It should not
26
be installed in a production environment.
28
The sample data consists of database entries, for populating sample subjects,
29
offerings, users, projects, groups and worksheets, as well as some sample
30
files in users' Subversion repositories.
32
Installing the sample data
33
==========================
35
The data is stored in an SQL dump file, in ``examples/db/sample.sql``.
37
You must import this data into a **fresh** IVLE database. If you already have
38
a working IVLE install, it will have to be erased. A script is provided
39
which performs the following tasks:
41
* Unmounts all users with accounts in the current database,
42
* Drops the IVLE database if it already exists (prompting first),
43
* Creates and initialises a new IVLE database, as per :ref:`database-setup`,
44
* Populates the database with the sample data,
45
* Creates data directories and subversion repositories for all users, backing
46
up directories for any existing users.
48
The script is executed with the following command::
50
sudo ivle-loadsampledata examples/db/sample.sql
52
.. warning:: This script essentially destroys all contents in an existing IVLE
53
installation. Be sure you wish to do this.
55
.. note:: The script may fail at the "dropping database" phase if Apache or
56
another process are using the database. It is best to stop Apache before
59
If the database exists, but is not properly initialised, then the script
60
may fail. In this case, you should manually run ``ivle-mountallusers -u``,
61
then drop the database, to ensure a clean build.
66
Subjects, semesters and offerings
67
---------------------------------
69
There are four semesters in the database: 2009 semesters 1 and 2, and 2010
72
.. note:: We pretend that we are in 2009 semester 2 (even if that doesn't
73
agree with the system clock). Therefore, 2009 semester 1 is a "past
74
semester", 2009 semester 2 is the "current semester", and the 2010
75
semesters are "future semesters."
77
There are four subjects in the database, with subject short names ivle-101,
78
ivle-102, ivle-201 and ivle-202.
80
The subjects have offerings for some of the semesters, as shown in this table:
82
+------+----------+-----------+
83
| Year | Semester | Subject |
84
+======+==========+===========+
85
| 2009 | 1 | ivle-101 |
86
+------+----------+-----------+
87
| 2009 | 2 | ivle-102 |
88
+------+----------+-----------+
89
| 2010 | 1 | ivle-101 |
90
+------+----------+-----------+
91
| 2010 | 1 | ivle-201 |
92
+------+----------+-----------+
93
| 2010 | 2 | ivle-102 |
94
+------+----------+-----------+
95
| 2010 | 2 | ivle-202 |
96
+------+----------+-----------+
101
There are four users (username/password). Note that in all cases, the password
104
* admin/password: This user has administrative rights over the entire system.
105
* lecturer/password: This is a normal user, but is enrolled as a lecturer in
106
100101 (2009 semester 1) and 100102 (2009 semester 2).
107
* studenta/password: This is a normal user, enrolled in 100101 (2009 semester
108
1) and 100102 (2009 semester 2).
109
* studentb/password: This is a normal user, enrolled in 100102 (2009 semester
110
2). This student has not yet accepted the Terms of Service, so does not have
113
.. note:: For the first three users, the Subversion password is also
114
"password". This means it is possible to access their SVN repository
115
with a stand-alone SVN client with that password. This is somewhat
116
unrealistic, as the SVN password in IVLE is usually a randomly-generated
117
string, not related to the user's IVLE login password.
119
When studentb logs in for the first time, his SVN repository is created,
120
and given a random password.
122
Updating the sample data
123
========================
125
For developers: If you need to update the sample data, follow this procedure.
127
Run the following command::
129
pg_dump --schema=public --disable-triggers --data-only --column-inserts \
130
--inserts --no-owner ivle > examples/db/sample.sql
132
Then check the diff. You may hand-edit the SQL file, but only for the purpose
133
of fixing up unsightly data -- it should be possible to reload from the script
134
and re-export with no diff.