Classroom Bookings

Craig Rodway


Table of Contents
1. Introduction
1.1. What is Classroombookings?
1.2. Main features
1.3. Known Issues and TODOs
2. Installation
2.1. Requirements
2.2. Installing on Linux
List of Figures
2-1. The Classroombookings installation page

Chapter 1. Introduction

1.1. What is Classroombookings?

Classroombookings is an open-source web application that has been designed to allow school staff to book shared resource rooms such as ICT suites and libraries.

Timetable view of a single day.


1.2. Main features

Classroombookings includes many features which make it simple and easy to use and customisable to your establishment.

  • Eliminate double-bookings - If a room is already booked by somebody or is used for a timetabled lesson, no one else can book the room for that period. Only administrators and room owners can cancel bookings.

  • Unlimited rooms and users - Manage as many rooms and add as many users as you like.

  • Easy-to-use - The simplified user interface makes all relative information available at a glance and makes it easy to see which rooms are available to book, and when.

  • Custom timetable - Not everybody has a single week timetable with fixed one-hour lessons. This is why we allow administrators to create their own timetable, with their own weekly cycle and lesson times to match the school.

  • Cross-platform - No executables, DLLs, runtimes or plugins are required. As it's web-based, a modern web browser is all that's needed for users to book rooms.

    On the server side, Classroombookings runs best with free software - ideally Apache 2 on Linux, but Apache on Windows will do just fine.


1.3. Known Issues and TODOs

This is a list of the current known issues and features yet to be implemented/completed with Classroombookings that will be resolved soon.

  • Making a one-off (static) booking when viewing the timetable a room a time will result in the booking being made for the weekday of the present date.

  • Inline help is not yet complete.

  • Report-generating is not yet complete.

  • No integration with third-party authentication provider (eg. LDAP, Samba)

  • If booking in advance is enabled, holidays are not taken into account. For example, booking 14 days in advance at the beginning of a 14 day holiday is not possible. This will be fixed soon.


Chapter 2. Installation

Important

Classroombookings has not been tested under IIS or any other database provider; and is not supported.


2.1. Requirements

  • Apache web server, with mod_rewrite (optional)

  • PHP version 4 (or 5, recommended) with GD/GD2 image libraries and MySQL.

  • MySQL database version 4 or above


2.2. Installing on Linux

Assuming you have Apache, PHP and MySQL installed with the relative modules enabled and configured, proceed with installing Classroombookings following these steps.

  1. Log in to MySQL, then create the database and user that will be used by Classroombookings. Don't worry about the tables at the moment - they will be set up later by the application.

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

    Make a note of the database name, username and password you set here as you will need these later.

    Note

    If you prefer, you can use a MySQL management tool such as phpMyAdmin to complete the above operations.

  2. Change to a location in the document root of the web server, eg /var/www or /home/httpd and then extract the archive.

    $ cd /var/www
    $ mkdir classroombookings
    $ cd classroombookings
    $ tar zxvf classroombookings-version.tar.gz
    
  3. You will now need to edit several lines in the configuration files:

    • system/application/config/config.php

    • system/application/config/database.php

    config.php

    // Full URL to your installation
    $config['base_url'] = 'http://www.example.com/classroombookings/';
    
    // Empty string if using mod_rewrite in .htaccess
    $config['index_page'] = 'index.php';
    

    database.php

    $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;
    
  4. Optional: Configure .htaccess for mod_rewrite. All you need to do is change the URL to reflect where Classroombookings is installed with a leading and trailing forward-slash.

    For example, if Classroombookings was installed at http://www.example.com/classroombookings/ then you need to change the RewriteBase to reflect the installation path. If you aren't using a subdirectory, just leave a single forward-slash.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /classroombookings/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
    </IfModule>
    
  5. The next step involves applying writable permissions to several directories in your installation to allow Apache to upload files to them (images, CSV files etc).

    $ 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
    
    Note

    You will probably require root privileges to apply the above permissions. Eg. If you're running Ubuntu, run sudo chmod.

  6. Finally, it is time to run the installation script.

    Using a web browser, navigate to the web server where you installed Classroombookings to, Eg. http://www.example.com/classroombookings/. You will be presented with the installation page.

    Figure 2-1. The Classroombookings installation page

    Fill in the required information (denoted with a red asterisk next to the field name) and click Install.