Instructions

Develop a web application using DHTML and PHP that receives assignment submissions with the following requirements:

  • All data storage must be performed using ‘flat’ text files (do not use an associative database). Two data files will be provided to you and will contain the following:
    • auth.txt – One or more lines with student ID and an MD5 encrypted password on each line (e.g., “01234567 5f4dcc3b5aa765d61d8327deb882cf99”).
    • enrolments.txt – One or more lines with student ID and a space separated list of paper numbers the student is enrolled in on each line (e.g., “01234567 159339 159301 159333 159234”). You may create other data files if you need them.
  • Create a welcome page with a session login form that checks the Student ID and MD5 “hashed” password against the entries in auth.txt. Upon successful authentication, the user should be redirected to internal pages, which should be inaccessible without authentication. Include a logout option on every internal page that logs the user out and redirects to the welcome page.
  • A logged in user must be presented with the following form elements:
    • Drop-down menu to select from a list of the papers that the user is enrolled in (parse enrolments.txt) with no default value.
    • Three radio buttons to choose the assignment number (assuming 3 assignments for all papers) with no default selection.
    • ‘File-to-upload’ input box that allows the user to select the local file they wish to submit.
    • Submit button that first verifies the file to be uploaded has one of the following file extensions: “.txt”, “.php”, “.cpp”, “.c” or “.html” and also verifies that a valid paper and assignment number have been selected by the user. If the validation fails, alert the user, specifying why the submission failed. Otherwise, permit the upload.
    • “View Statistics” button should take the user to a page displaying a dynamically generated table with four columns. First two columns should contain the list of all paper/assignment number combinations that the user is enrolled in. Third column should display Yes or No to indicate whether the user made a submission for this paper/assignment number and the fourth column should contain the total number of submissions (not including multiple submissions) - see Table 1 for an example. See image.
  • An uploaded file should be renamed and stored in a directory that follows the path format: “files/paper number/year/semester number/assignment number/student id.txt”. The year can be determined by the server date, as can the semester number (consider any date prior to July 1 to be semester 1 and any date on or after to be semester 2). Keep the same file extension. If the directories do not yet exist, your application should create them. If a previous submission exists for the same assignment and student, rename the old file by appending three digit version number “.000” or “.001” and so on, depending on how many previous submissions there have been, resulting in files like 07345456.html.000 and 07345456.html.001, etc. No uploaded file should be deleted or overwritten.
  • Display a “Success” or “Error” page after the file transfer attempt with a link back to the main internal page.
  • Think about usability and include appropriate navigation on all pages.
  • Think about security: none of the internal pages should be accessible without proper authentication, none of submitted files should be accessible for download (even through a direct link), etc.
  • Write a short document explaining the design and implementation of your application and the languages you have used for each important component (max 1 page). Marks will be awarded for well commented code.
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.