I am currently developing an educational application for exams. In this app, a teacher creates exams and students answer them. Once the student has submitted all their answers, I want to display the exam results which will include the correct answers along with the student's responses. Since it is a multiple-choice format, I plan to indicate when the student selected the incorrect answer and provide feedback on why it was wrong.
One idea I have is to create a middleware that handles the correction process and generates a result document once the student completes the exam.
Is there any other approach you would recommend for managing this process effectively?