Homework 6
CS520, Spring 2011


Due: Friday, June 3

Package all the source files of your project into a zip file using the zip Ant target you developed in Homework 1, and upload the zip file to CSNS. Note that file uploading will be disabled automatically after 11:59PM of the due date, so please turn in your work on time.

[Calendar for CSNS]

Continue to work on CSNS Calendar and implement the following functionality.

1. Section Events (40pt)

When an instructor creates a new assignment, a section event is created and added to the calendar automatically. The title of the event is the name of the assignment, and the start time and end time of the event are the due time of the assignment.

When an instructor edits an assignment, e.g. changing the name or due date of the assignment, the event associated with the assignment should be changed automatically. And if an assignment is deleted, the event associated with it should be deleted as well.

Make sure that date highlighting in the calendar display still works correctly after you implement section events. In particular, a date should not be highlighted if there is a section event on that date but the current user is not enrolled in that section.

2. Event attachments (30pt)

Allow users to to add file attachments to an event. File attachments can be uploaded one file at a time, with no limit on how many files can be attached to an event (i.e. similar to file upload for homework submission in CSNS).

The attachments of an event are displayed in the event details view, and a user may click on an attachment to download or view it.

3. Full Text Search (30pt)

A user may perform full text search on events. The system should search both the titles and the descriptions of the events that the user has access to. The search results should be ordered by their relevancy scores, with the most relevant result first. For each event in the results, display the title, description, start and end time of the event with the query terms highlighted. Clicking on the title of the event should take the user to the page showing the details of the event.

This feature must be implemented using the full text search support provided by PostgreSQL.

[About Submission and Grading]

Before submitting your work, commit all the changes to your Subversion repository and create a tag.

If you use any libraries that are not in the original CSNS and are not included in your csns.zip, please upload the library jar files together with csns.zip when you submit your work.

To test your project, we will use the following SQL scripts in your csns.zip to create, populate, and then clear the database:

Please make sure that these scripts are up to date and can be run in their entirety without generating any errors.