Term Devel Notes
Dec. 17, 2008
I need a tool to manage academic terms. There was a tool that did this once, but it was never released to the Sakai community and therefore cannot be used. This project will create a similar tool, built from scratch so as to avoid any impropriety.
Copied the structure of an existing RSF tool for it's structure. Stripped out all code and stubbed in Hello World content. Builds and runs in the Admin Workspace of a local Sakai instance.
Dec. 18, 2008
Created this document and a project site in my personal Confluence site. The tool will provide basic CRUD operations: create a term, display existing terms, modify them, and delete them. The first step is to create the default page, which will show all existing academic terms.
Since this is coming purely from me on my own time, I changed the package name to com.nolaria.term.too. Also, the header for ShowTerm.java reads:
/** * Created on Dec. 18, 2008 by Mark J. Norton * This file is (c) 2008 Nolaria Consulting and licensed to the Sakai community under the terms of the * Education Commons License (ECL) */
Created the main producer as ShowTerm.java. Added code to get an instance of the Course Management Service. Used a call to cms.getAcademicSessions() to get the list of terms. Title and id are shown. I will add start and end dates. Currently displays as:
Next up is to add a link at the bottom to a create term page.
Added link on ShowTerm page to CreateTerm page. Compiles and works, but page is stubbed out.
Next: implement create form.
Dec. 19, 2008
Started work on the create form.
Got the initial version of the create form working. Dates are a bit hacked, requiring users to enter it like, 1/1/2008.
The academic session table is called CM_ACADEMIC_SESSION_T.
The entry I created is fall2009.
+---------------+-------------+------------------------+------------+------------+ | ENTERPRISE_ID | TITLE | DESCRIPTION | START_DATE | END_DATE | +---------------+-------------+------------------------+------------+------------+ | fall2008 | Fall-2008 | Fall of 2008 | 2008-06-06 | 2008-12-31 | | spr2009 | Spring-2009 | Spring of 2009 | 2009-01-01 | 2009-06-30 | | fall2009 | Fall 2009 | The Fall of 2009 term. | 3909-02-09 | 3911-08-12 | +---------------+-------------+------------------------+------------+------------+
A quick check of worksite setup shows only fall2008 and doesn't include the one I just made. Grr.
Note also that the year is wrong. This turns out to be a function of the Date object, which measures years from 1900. Fixed.
Dec. 21, 2008
I wondered if the IS_CURRENT field of the CM_ACADEMIC_SESSION_T would make the term available in Worksite setup. This field is a bit map with a single bit, so you need a statement like:
update CM_ACADEMIC_SESSION_T set IS_CURRENT=TRUE where ENTERPRISE_ID="cal2009";
This correctly set the table entry, but didn't make that semester available for use.
Here is the full table definition:
CREATE TABLE `cm_academic_session_t` ( `ACADEMIC_SESSION_ID` bigint(20) NOT NULL auto_increment, `VERSION` int(11) NOT NULL, `LAST_MODIFIED_BY` varchar(255) default NULL, `LAST_MODIFIED_DATE` date default NULL, `CREATED_BY` varchar(255) default NULL, `CREATED_DATE` date default NULL, `ENTERPRISE_ID` varchar(255) NOT NULL, `TITLE` varchar(255) NOT NULL, `DESCRIPTION` varchar(255) NOT NULL, `START_DATE` date default NULL, `END_DATE` date default NULL, `IS_CURRENT` bit(1) default NULL, PRIMARY KEY (`ACADEMIC_SESSION_ID`), UNIQUE KEY `ENTERPRISE_ID` (`ENTERPRISE_ID`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;