Installation Guide

Installing Conditional Release

Introduction

Conditional release of resources has been implemented and tested at Georgia Tech. All the code has been synced back to Sakai's public repositories and is ready to be installed in any Sakai 2.4.x system.

The Code

Conditional release is not just a single independent module, as a standalone tool would be. Conditional release is a new module plus a modified versions of the content, gradebook, and event modules.

Conditional Release summary of new code

  1. the all-new conditions module
  2. modifications to content
  3. modifications to gradebook
  4. modifications to event

Since conditional release is new and not yet a part of Sakai, each of these modifications lives on its own outside the main repository trunk.

conditions module

The conditions is located at https://source.sakaiproject.org/contrib/conditionalrelease/trunk

content

The modified content module is at https://source.sakaiproject.org/svn/content/branches/SAK-11543

gradebook

The modified gradebook module is at https://source.sakaiproject.org/svn/gradebook/branches/SAK-11542

event

The modified event module is at https://source.sakaiproject.org/svn/event/branches/SAK-12478

(Somewhat) Quick Start

You can download a full 2.4.x Sakai distribution which includes conditional release by using Subversion to either checkout or export from the following URL: https://source.sakaiproject.org/contrib/conditionalrelease/branches/sakai_2-4-x_conditional_release

As with many Sakai distributions, this is just a set of Subversion externals definitions. This particular distribution is identical to Sakai 2.4.x except for the new conditional release pieces.

Once you have the source code, you can build and deploy as usual, and conditional release ought to be ready to use. If it isn't, please contact zach@aeroplanesoftware.com

Adding Conditional Release to an Existing Sakai Codebase

If you don't have any local modifications to content, gradebook, or event, you can just replace these modules entirely with the conditional release version. If you have checked these out with Subversion, you can use svn switch to swap out the code like this:

Switching out a module

svn switch https://source.sakaiproject.org/svn/content/branches/SAK-11543 my_sakai_source_code/content

If your copy of the source code is not version-controlled, you can just replace those specific modules completely like this:

Wiping and replacing a module

rm -rf my_sakai_source_code/content
svn export https://source.sakaiproject.org/svn/content/branches/SAK-11543 my_sakai_source_code/content

rm -rf considered harmful

Don't forget that when you're deleting entire directories you really want to be sure that's really what you want to do.

If you do have local changes in those modules, you'll have to manually merge the changes for conditional release into your source code. There is a wide variety of tools and techniques to achieve this, and performing such a merge is unfortunately outside the scope of this document.

Datetime Quartz Job

The conditions module includes a very simple Quartz job. Since one of the conditions that can be set on a resource is that an assignment due date must have passed (or not have passed), and since the conditions are evaluated by responding to events, we need Sakai to be able to fire an event every once in a while to remind the condition evaluator to see what time it is. Here is the full text of the DatetimeEventJob's execute method:

DatetimeEventJob.java
public void execute(JobExecutionContext arg0) throws JobExecutionException
  {
	Long now = new Long(new Date().getTime());
	EventTrackingService.post(EventTrackingService.newEvent("datetime.update", now.toString(), true));
  }

This job will show up in your Quartz scheduler tool under the name "Conditional Release Datetime Job." In order for assignment due dates to be evaluated properly, you should have this job execute every midnight.