Question
Front-end (Client) Requirements: Page 1 - Admin/Question Creation Page - This page should show the questions for your quiz. Regardless whether there are already questions
Front-end (Client) Requirements:
Page 1 - Admin/Question Creation Page - This page should show the questions for your quiz. Regardless whether there are already questions or no questions, the admin should be able to click a button to create a question.The user should be able to choose to create between two to four choices (answers), which only one is set to be correct in the database. After entering the necessary fields, the admin can save the question and make a POST request to save it in the database. Also, if questions already exist or have been created, the admin should also be able to make edits to the question.
Page 2 - Student Page - The page should show the questions that are stored in the database for the student to answer. If there are no questions, it should let the user know. The student should also be able to take the quiz. After answering all the questions, they can 'submit' and have their quiz evaluated, prompting a modal or alert stating what their grade is.
Back-end (Server) Requirements:
Using Express is optional. Express will be covered at a later date, but if you are confident and would prefer using Express, by all means go for it. However, help will not be provided in using Express if you opt to do so.
The following HTTP requests are required for your server to implement. That means your client side will communicate with the server via these methods:
GET /questions - get all questions stored
POST /questions - create a question (with necessary question data)
PUT /questions - update a question
For POST, the back-end should not take a batch of questions to store it in the database iteratively. POST should only handle one question at a time, same with PUT.
Database Requirements:
You can design your DB however you need to consider the fact that some questions might have two some might have three or some might have four choices depending on the decision of the admin at the time of designing the quiz questions. You cannot have a table with sparse columns such as
question, option 1, option2 , option3, option 4, ...
as this would leave empty columns for questions that have less than four choices
As a tip, you need to have at least two tables.
You are only allowed to use SQL based databases(e.g. relational databases such as PhpMyAdmin, SQLite, postgres, mysql, etc.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started