The Programmes Plant is part of the XCRI-CAP project at the University of Kent, and is a replacement for the existing Programmes Factory.
Please refer to the current brand guidelines for use of the existing brand.
The following are instructions on running the Programmes Plant on a local machine for development.
Install this in one line? Why of course! Should work on any sensible Unix like system with Git installed.
curl -s https://raw.github.com/unikent/programmes-plant/setup/setup.sh > temp.sh && sh temp.sh && rm temp.sh
Clone this repository. Change into the directory.
Obtain Laravel as a submodule by running
git submodule initthen
git submodule update, unless you have done a recursive clone. Note that this app uses the University of Kent Laravel fork, because this contains important performance enhancements as yet not pulled into the Laravel core. This fork is generally kept up to date with the Laravel master branch, so including it as a submodule should give you the latest version of Laravel. We also use the Verify Laravel bundle as a sub-module but maintain our own fork.
Install Composer and run
composer.phar install --devto install dependencies.
You need to setup the application by editing all the sample files in
config/and moving them to
config/local/filling in as appropriate. To move the files in one command, run:
mkdir application/config/local && cp application/config/*.sample application/config/local && ls application/config/local/*.sample | while read file; do mv $file `echo $file | sed s/.sample//`; done
You will need to create a MySQL database. Create this database and add the credentials to
The application requires an authentication driver to be used. The details of this can be setup in
application/config/local/auth.php. We use our own LDAP Verify driver. If you decide to use our bundled LDAP Verify driver, the server settings can go in
php artisan migrate:install --env=localto setup the migtations table. Then run
php artisan migrate --env=localto run all the migrations to setup your database.
php artisan setinitialuser <your username> --env=localto setup the hyperadmininistrator (the user with all access on the application - a.k.a The Big Cheese). This user must correspond to a valid LDAP user if you are using LDAP.
Point a web server at the
public/folder. If the domain you have aliased locally is not like 'localhost' or '*.dev' then Laravel will not be able to work out that you are running in the local environment and it will throw an exception on every page. If you want to use something other than these, add your environment to the array at
'local' =>on line 25 of
./paths.phpat the root of this repository.
Point a browser to the URL of the Programmes Plant!
Seeding the data
We have provided some data seeds to allow you to get going with some sample data, particularly for programme data.
To run all the seeds type
php artisan seed --env=local.
Unit tests are written in PHPUnit. To run the tests run
php artisan test. The tests use an in memory SQLite database to make them significantly faster.
Want to consume the data from a Programmes Plant API? Consider using our PHP library for this.
Want to see what a front-end to this data might look like using this library? See Of Course.
Course data from SITS
The task file
sitsimport.php can be run manually on the server, but is set up to run as a cron every night at 4am (under user fm200). The task reads a SITS export XML file sitting in our shared
/data folder. The task then reads in data from the file and creates entries in the current year of UG (in the programme and programme_revisions) and PG (in deliveries). The data imported is IPO, POS code, MCR code, ARI code, description, award, and full-time/part-time.
The IPO, MCR, and ARI codes are used to direct users to the appropriate course in SITS when the click the 'apply', 'enquire', or 'order prospectus' links on a course page.
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 3 of the License, or 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, see http://www.gnu.org/licenses/.