@jlrdw @SilenceBringer @bugsysha any idea how to tackle this?
And sorry to mention you in this thread just trying to get some help ASAP.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, devs, A saas web app exists that high XUL students can access to get exam preparatory material and past exam papers.
The web app now needs to be modernized and make it more interactive, adding functionality to take an exam of the past exam paper online with a timer and give a score at the end of the exam and also show your answers against the correct and the end of an exam.
Processing this in my head, I going to need
1.Exam Model [has many questions]
2. Questions Model [a question has many answers and belongs to Exam]
3. Answers Model [an answer belong to a question and also has a boolean of correct and incorrect]
4 . A user model [a user has many exams, meaning a user can take many exams]
5. Pivot table to store whether a user has taken an exam
Hoping what I have is correct the dilemma comes when trying to figure out the best way to store a users score and also highlighting user answers and correct answers at the end of the examShould I have a score/results table and also the answers table that links a user's answers to an exam?
Ok. So for your answers, how do you get access to answers submitted by a specific user?
You’ll need a table with
You might to add dates too, so you can track when answer was submitted
You may also want to record whether this is the correct answer here, although you can probably get that via relationship on answers table
Please or to participate in this conversation.