In the first screen, you will provide a form for the user log on. This will be a simple form with a text field, a password field, and a submit button. It should also have a way to signify that this is a new user. If the login is successful (see below), you will proceed to the next screen. If not, give an error message, and tell the user to go back.
The second screen is the main program. This screen will show a list of the user's tasks, and provide a method to add a new task. The task must have a title, a description, and a deadline. The deadline should have at least Month, Day, and Year. (Adding Hour, Minute, and Second is optional). Any current tasks that have a deadline in the past must be displayed in red. This screen must also have a means of marking a task completed.
On this second screen will be an Update button. Clicking this button will first add the new task (if any), and secondly it will remove the tasks listed as completed (if any). Also, you must send an email to the user, informing him/her that the task has been completed. In this email, give the task's title, description, deadline, and time completed. After this update button has been pushed, your program must go back to the second screen, and display the updated information.
If the user logs on with an incorrect password, or with a username not in the system (and it's not marked as a new user), you should print an error message and tell the user to press the Back button. Likewise, if the New User field is marked, and the user entered is already in the system, you should print a similar error message.
Note that only the tasks for the user that is logged onto the system should be displayed. Any other tasks in the system that belong to another user should not be displayed
dateDdd Mmm # hh:mm:ss ZONE yyyyWed Nov 6 11:34:49 EST 2002I would suggest only worrying about the Month, Date, and Year for the purposes of this homework. In that case, a deadline is considered passed if the current date is at least one day beyond the deadline date. (ie, if the two dates are equal, the deadline has not yet passed). If you choose to extend your program to use the Hours, Minutes, and Seconds, then a deadline is passed if the current date is one second beyond the deadline date.
Note that it is perfectly acceptable for a user to enter a new task that is already passed the deadline.
I will point out that there is a Date::Manip module available on CPAN that you may wish to try to use as an alternative. However, I am not endorsing this method, so do not expect any assistance with it from me.
In general, any time the user does something 'wrong' and then pushes a submit button, print a blank screen with an error message, part of which tells the user to push his/her back button.
Your entire program must be contained within one single perl file. It is not permissable to have a static HTML file that contains the initial form, or a seperate CGI program for the logon and main screens.
You may choose any style of datafile you wish to create, so long as your program can write to it and parse it.
| Create New User | 5 |
| User Logon | 10 |
| Display Current tasks | 15 |
| Past Deadline tasks in red | 10 |
| Add new Task | 15 |
| Mark Task Completed and remove | 15 |
| Email user when Task Completed | 10 |
| Compilation | 5 |
| Error Checking | 5 |
| Code Style | 5 |
| 'Output' Style | 5 |
~lallip/public/submit.pl.
The assignent is due Wednesday, November 20th at 11:59:59pm
EST. It may be turned in up to 24 hours late for a 20% penalty.