v1

Documentation for Version 1

Requirements

What you need to have to get up and running on your own servers.

Installation

Ensure that the web server, PHP and relevant modules, and MySQL are installed, enabled and configured.

Create the database

Create an empty database to use for Classroombookings. It's easy to do this in a management interface like phpMyAdmin, Adminer or HeidiSQL, but it can also be done through the command line:

$ mysql -u root -p 
Enter password: 
mysql> CREATE DATABASE crbs; 
mysql> GRANT ALL PRIVILEGES ON crbs.* to 'crbs_user'@'localhost' IDENTIFIED BY 'P@55w0rD';

Make a note of the username, password and database name that you used, they will be needed later.

Extract files

The Classroombookings files need to be placed on the web server, ideally in their own directory. For example, www.example.sch.uk/classroombookings.

If you have command line access to the web server, you can copy the zip file to an appropriate directory, and extract it.

If you do not have command line access, extract the zip file to a folder on a computer, then use a file transfer utility such as WinSCP or FileZilla, to transfer all of the files to the chosen directory on the web server.

Edit configuration

There are two configuration files that need to be edited with the correct details for your setup. There are example versions at system/application/config/config.default.php and system/application/config/database.default.php. Rename these to config.php and database.php.

Edit both of the files and change to suit your configuration, as outlined below.

config.php

Update the two variables to reflect your installation URL and the use of clean URLs. If you are not using clean URLs, leave index_page as it is.

Note: The base_url value must end with a forward slash.

// Full URL to your installation
$config['base_url'] = 'http://www.example.com/classroombookings/';

// Empty string if using mod_rewrite in .htaccess to enable clean URLs
$config['index_page'] = 'index.php';

database.php

Change the values here to match your database configuration - the database details from earlier should be entered into here.

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'crbs_user';
$db['default']['password'] = 'password';
$db['default']['database'] = 'crbs';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['active_r'] = TRUE;
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;

Clean URLs (optional)

If you are using the Apache web server, classroombookings supports clean URLs (removing index.php from them) using mod_rewrite and the .htaccess file.

To eable this, rename _.htaccess to .htaccess.

Edit .htaccess and change the URL for the RewriteBase entry to reflect where classroombookings is installed.

If installed at a subdirectory, make sure it has a leading and trailing forward-slash. If it's installed at a subdomain or at the 'root' level, it should just be a single forward slash.

For example, if classroombookings was installed at http://www.example.com/classroombookings/ then you need to change the RewriteBase entry to reflect the installation path as in this example:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /classroombookings/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

Filesystem Permissions

The web server will need write permissions to the folders listed below, in order to allow photos and files to be uploaded. The example below shows how to enable this via the command line, but it should be possible to do this with a file transfer utility like WinSCP or Filezilla.

$ cd /var/www/classroombookings/ $ chmod -R 775 webroot/images/roomphotos $ chmod -R 775 webroot/images/schoollogo $ chmod -R 775 webroot/images/bg $ chmod -R 775 system/cache $ chmod -R 775 temp In the above commands, "cd" into the folder where classroombookings has been extracted to (in tihs example, it is /var/www/classroombookings).

Run installation procedure

Using a web browser, navigate to the URL where you installed classroombookings. You should be presented with the installation page.

Complete the required fields, and click Install.

Once the install process has finished, you will need to remove a file from the classroombookings directory. Using the file transfer utility or the command line, remove system/application/controllers/install.php.

Configuring

Customise classroombookings to your environment.

To get the most out of classroombookings, take some time at the beginning to set it up to work the way your school works.

Once you've got it installed, the recommended order for configuring it is:

School Details

Use the school details page to set your school's information (name, website address and logo) as well as display options for the Bookings page.

Booking in advance

Use this option to limit the number of days ahead that teachers can make bookings, based on the current day when making the booking.

Example: booking in advance is set to 3 days. On Monday, teachers can book rooms between Monday and Thursday.

Display type

This option changes the focus of the bookings page.

Columns

This determines which data aspect is shown on the bookings table, and is dependent on the Display type set.

The School Day

Use the school day section to set up how your day operates - primarily, the lesson/period times. You do not need to enter breaks - just the periods that you want rooms to be able to be booked on.

It is not recommended that periods overlap.

Some people find it useful to add "Before school" and "After school" periods, if rooms are sometimes used "out of hours".

Academic Year & Week Cycle

Classroombookings needs to know about the Academic Year before the timetable weeks can be configured. Use the Academic Year link to set the start and end date for the academic year, typically from September to July.

Use the Week Cycle page to configure the timetable weeks. These are essential for making recurring bookings, mainly used for the traditional timetabled lessons. The flexibility in defining the weeks allows multi-week timetables to run throughout the academic year; but instead of alternating in a week one/week two fashion, you define each week in the year to a specific timetable week.

When you create a recurring booking, it is assigned to a room and period for the given day on the timetable week that the date falls on.

Example: creating a booking for Period 1 in Room 1 on a Monday in "Week 1" will ensure that the booking occurs every Week 1 on a Monday at Period 1 in Room 1.

If you only operate a simple one-week timetable, a week still needs to be added. Give it a name like 'Timetable', and tick all of the weeks in the year."

Holidays

It is possible to prevent bookings from being made on certain fixed singular dates or date range throughout the academic year using the Holidays feature. Make sure to enter just the dates that fall within the actual holiday - do not include the "break up" or "returning" date.

Holidays affect bookings for all rooms and all periods on the holiday's dates.

Rooms

Use this section to set up the rooms that can be booked.

If you wish to highlight certain features of the rooms, you can do this with custom fields. Common uses for these are things like room capacity, number of computers, and whether certain features are available, like printers and projectors.

You can save time by creating the fields you want to use first, and then adding the rooms.

When adding a room, some of the information you enter (e.g. owner, location and photo) will be accessible and visible on the bookings page to other users.

The Room owner setting allows you to designate a classroombookings user as the owner of that room. This gives the user the special permission of being able to delete other user's bookings in their room.

Users

Users are central to accessing classroombookings. There are currently only two types of users: Administrator, and Teacher. Administrator users can do anything within the system. Teacher users can only create bookings for bookable rooms, up to number of days ahead as configured in the Booking in advance setting mentioned above. Teacher users to not have access to any of the management features.

It is also possible to bulk import users from a CSV file using the Import users page.

The CSV file needs to be formatted with the following columns:

username, firstname, lastname, email, password

If you choose to set a password for the imported users on the Upload page, the field in the CSV file will be ignored.