-
Notifications
You must be signed in to change notification settings - Fork 4
Rollover
Rolling all UG or PG programmes in one year over to the next, can be achieved by using the provided roll over task. The task will create an unpublished duplicate of each programme in the "from" year in the "new" year, that can then be edited and updated before being published on the live system.
This task is designed to aid in the annual rollover process and may resemble the following
php artisan rollover:ug 2012 2013 --env=local
The command requires both a "from" year (2012 in the above) and a to year (2013 in the above), and can be run with either UG or PG programmes. The laravel env setting may also need to be provided to ensure the task is run using the correct config.
If you need to roll over a large number of programmes, you may also need to increase the php memory limit for the command by using somthing like
php -d memory_limit=512M artisan rollover:ug 2014 2015 --env=www-dev
To also roll over overridable fields etc, run
php -d memory_limit=512M artisan rollover:settings ug 2018 2019 --env=www-dev
Alternatively you can use capistrano to do the whole operation without logging into the remote server. Just type something along the lines of:
bundle exec cap www-dev artisan:rollover -s coursetype=ug -s year1=2014 -s year2=2015 -s memory=512
where of course you can change coursetype to ug/pg, vary the source and target years, and modify the memory (in MB).
Note that the capistrano deploy asks for confirmation before running, so typing in the above is safe to run even if you've made a slight mistake in the year or coursetype because you'll have a chance to back out.