PA 10.1 (advanced): Add support for multiple choice questions
- Due Nov 4, 2020 by 11:59pm
- Points 1
- Submitting a website url
- Available after Oct 14, 2020 at 12am
UPDATE
This is now broken into two parts: front end and back end. You may do either one for credit for an "advanced" PA, or do both of them for credit for two separate "advanced" PAs. Let me know which one you chose in your README file.
If you choose to do the front end, you should still include handlers and routes in api.php, but they don't need to do anything (just return success or, if needed, dummy data). The frontend should appear to work until the page is refreshed or the VidQuiz is unloaded.
If you choose to do the back end, you must ensure that multiple choice data sent to the server can be saved to the database and is retrievable. The front end doesn't need to do anything special to handle this data, though it should be modified if necessary to not conflict with the changes you've made to api.php.
Copy the ca10-solutions code from the course Dropbox folder Links to an external site. (or a newer version of that code) to a new folder in your Git repository: pas/pa10.1. Update VidQuiz so that:
- the data model incorporates multiple choice questions in a logical, relational way
- the VidQuiz API supports CRUD on multiple choice questions
- you'll need to add a database table and update the question CRUD API handlers to deal with multiple choice data (those functions will need to touch two database tables) in api.php
- you'll also need to modify some of the code in crud.js to handle sending the additional multiple choice question data
- the user can create multiple choice questions as outlined in Class Activity 5
- in play mode, multiple choice questions appear as outlined in Class Activity 5
- all data is stored server-side (no local storage)
Here's the rubric:
[ ] users can choose for a question to be a multiple choice question in edit mode
[ ] users can add answer options
[ ] users can remove answer options
[ ] users can modify answer options (the text and whether they are "correct" or not)
[ ] any number of the options may be marked "correct"
[ ] in play model, questions cause the player to stop and the question text is shown
[ ] for multiple choice questions, the options are displayed
[ ] one or more of the options may be selected
[ ] after clicking "submit", the correct answers are shown to the user
[ ] the user must click "continue" to continue playback
[ ] multiple choice data is stored server-side
[ ] the VidQuiz API supports multiple choice CRUD
[ ] the code is well commented and styled
[ ] there is a header at the top of the file that includes the name of the author(s) and a brief description of the file
[ ] the PA folder includes a README.md file with the required information in it
Submitting PAs
Be sure to create a README.md with the following information:
- who you worked with (say "I worked alone" if you didn't have a partner)
- how long you spent on the assignment
- the PA option (and, if applicable, the earlier PA option it builds off of)
- a copy of the PA option's rubric, filled out (only submit if you can honestly check off each of the criteria)
- what the most challenging aspects were
- any lingering questions you have about the assignment
Commit and push your git repository to GitHub, then paste a link to your PA directory.