Homework 5
CS520, Spring 2012

Due: Friday, May 25

Package all the source files of your project into a zip file as you did 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.

[Class Websites for CSNS2]

This assignment builds on top of your work in the previous assignments, so make sure that all the functions from the previous assignments work properly; otherwise you will not receive any credit.

Continue your work in Homework 4 and implement the following features in CSNS2.

1. (30pt) Email.

When an instructor posts a new announcement on a class website, all the students should receive an email notification about the announcement. The subject of the email should include the course code and the date of the announcement, and the content of the email should include the name of the instructor who posted the announcement, the announcement itself, and a hyperlink to the class website. For example:

Subject: CS520 Announcement 5/16/2012
Content: Chengyu Sun posted the following announcement on the CS520 class website at http://csns.calstatela.edu/sites/spring2012/cs520/section1:
Midterm presentation will be from 4:20PM to 6PM on Tuesday 5/15 and Thursday 5/17.

2. (25pt) Add Items.

Allow an instructor to add items to a block. Note that an item has a name and content, and the content of an item could be a URL, an uploaded file, or some text entered by the user.

3. (25pt) Display Items.

Once an item is added, the item name appears in the block to which it is added. A user may click on the name of an item, and the action that should take place depends on the type of the item content:

4. (20pt) Edit Items.

Allow an instructor to edit items. Note that editing an item may involve changing the name, the content, and the type of the content.

[About Submission and Grading]

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

To test your project, we will use the following SQL scripts in your zip file 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 any errors.