Assignment 5
Assignment 5
Introduction
This assignment is the fifth of six assignments. In this assignment, a data clerk will maintain a list of
meal kits. Data clerks will have the opportunity to upload image files as part of a multi-part form
submission.
Before you begin this assignment, you must finish your previous assignment. All objectives listed for this
assignment are to be made “on top” of your previous assignment.
Most of the materials posted in this course are protected by copyright. It is a violation of Canada's
Copyright Act and Seneca's Copyright Policy to share, post, and/or upload course material in part or in
whole without the permission of the copyright owner. This includes posting materials to third-party file-
sharing sites such as assignment-sharing or homework help sites. Course material includes teaching
material, assignment questions, tests, and presentations created by faculty, other members of the
Seneca community, or other copyright owners.
It is also prohibited to reproduce or post to a third-party commercial website work that is either your
own work or the work of someone else, including (but not limited to) assignments, tests, exams, group
work projects, etc. This explicit or implied intent to help others may constitute a violation of Seneca’s
Academic Integrity Policy and potentially involve such violations as cheating, plagiarism, contract
cheating, etc.
These prohibitions remain in effect both during a student’s enrollment at the college as well as
withdrawal or graduation from Seneca.
This assignment must be worked on individually and you must submit your own work. You are
responsible to ensure that your solution, or any part of it, is not duplicated by another student. If you
choose to push your source code to a source control repository, such as GIT, ensure that you have made
that repository private.
A suspected violation will be filed with the Academic Integrity Committee and may result in a grade of
zero on this assignment or a failing grade in this course.
WEB322 – ASSIGNMENT #5 – WINTER 2024 DUE: APRIL 5, 2024 @ 11:59 PM EST
Technical Requirements
Objectives
Data Loading
Create a throw-away “load data” controller but do not delete the controller; the controller must be
submitted so it can be marked by your professor.
The “load data” controller must contain a route that will populate meal kit data. The following are the
requirements for the route:
1. A data clerk can load meal kit data to the database by accessing the URL “/load-data/mealkits”.
2. This functionality must be placed in its own controller and must be coded using the MVC design
patterns learned in class.
3. You must check to ensure that there are no meal kits in the database before adding new meal
kits; this is it to prevent the adding of duplicate entries.
4. You must populate at least six meal kits in total.
a. At least three meal kits should be marked as “featured” and displayed on the home
page.
b. The “on the menu” page should contain at least six listings grouped into two different
categories.
c. The “featured” meal kits will appear on both the home page and the “on the menu”
page.
5. After accessing a load data route, display an EJS view with a message describing the outcome:
WEB322 – ASSIGNMENT #5 – WINTER 2024 DUE: APRIL 5, 2024 @ 11:59 PM EST
a. If data was loaded to the database, display a message like “Added meal kits to the
database”.
b. If data has already been loaded to the database, display a message like “Meal kits have
already been added to the database”.
c. Only data clerks can load data. If the user is not a data clerk or not logged in, display a
message like “You are not authorized to add meal kits” and return a 403 status code.
d. The message must be properly styled and rendered within the main layout.
6. Add a link to the data clerk’s “meal kits list” (/mealkits/list) page that will navigate the clerk to
the load-data page.
You are required to implement a Data Entry Clerk Module that allows a “logged-in” data entry clerk to
perform the following tasks.
At the top of the page, place an “Add” button that directs the data clerk to the “/mealkits/add”
route. You should only have a single “Add” button, you do not need one for each meal kit.
Additional Notes:
• Ensure that meal kits entered into the database are populated on the front-end of the web
application.
a. All meal kits must appear on the “meal kits” page grouped within the appropriate
location.
b. Only the meal kits that were set as “featured” should be displayed on the home page.
c. A visitor does not need to be logged in to view the meal kits on the home page and the
“meal kits” page.
• For both the “add” and “edit” routes, ensure the data clerk can only upload images stored as
one of the following media types (extensions): jpg, jpeg, gif, or png.
GitHub
You can continue to commit code changes to your local git repository but do not push your changes to
GitHub. If you push your changes to GitHub you may update your cyclic website before it has been
marked.
Cyclic
This assignment will be marked locally (on your professor’s machine). You do not need to deploy this
assignment to Cyclic.
WEB322 – ASSIGNMENT #5 – WINTER 2024 DUE: APRIL 5, 2024 @ 11:59 PM EST
Rubric
• A correct, formatted,
message is displayed after
attempts to load data. The
header and navigation bar
are present. A link from the
“meal kits list” page exists.
Total: 20 Marks
Make sure you submit your assignment before the due date and time. It will take a few minutes to
package up your project so make sure you give yourself a bit of time to submit the assignment.
1. Do not push any commits to GitHub until assignment 3 has been marked.
2. Locate the folder that holds your solution files. You must delete the “node_modules” folder but
do not delete any other files or folders.
3. Compress the copied folder into a zip file. You must use ZIP compression, do not use 7z, RAR,
or other compression algorithms or your assignment will not be marked.
5. Submit/upload your zip file. The page will accept unlimited submissions so you may re-upload
the project if you need to make changes. Make sure you make all your changes before the due
date. Only the latest submission will be marked.