In this project, you can enter math questions into the database to build a question bank. Then we can generate homework assignments from the question bank. Assume that the users of this web application are math teachers.
Database
1. You need to create a table to store all the math questions.
2. You need to create a table to store all the assignments containing auto-increment IDs and titles.
3. You need to create a table to store the mappings between the math questions and the assignments through their IDs.
User interface
Based on your own understanding, you design your user interface. The basic consideration is: Your UI should support all the features in this project.
Features
1. When a user comes to the web application, you display the whole page of the math questions. For simplicity, we do not require you use pagination to display questions in multiple pages all in one page.
2. There is a textarea on the page so that any user can enter a math question into the database. When a question is entered, you are not required to do any validation on your data.
3. Allow a user to create a new assignment by providing a title. If the title already exists, do not enter it into the table. A newly created assignment is automatically set as the current assignment. The ID of the current assignment is stored in the session.
4. There is a dropdown list for all the assignments with the current assignment selected. When you select a different assignment, that assignment is set as the current assignment.
5. Each question is associated with an Add to Assignment button. When this button is clicked, this question is added into the current assignment.
6. In order to avoid adding one question into the same assignment more than once, if a question is already in the current assignment, do not display that Add to Assignment button. Instead, you display a Remove from Assignment button, and when this button is pressed, the quastion is removed from the current assignment.
7. After each question, also display which assignment it belongs to, so as to make the instructor aware of the situation. In general, an instructor should only use a question in at most one assignment (for one course).
8. There is a button to allow the user to view all the questions in the current assignment.