Do logic on data after post

I'm building an exam app. Where a tutor makes an exam and a student answer to this exam. I want to show the result to this exam after the student has posted all his answer. I use to express and MongoDB. When I show the result this is with the exam + the answer of the student. I mean this is multiple choice, so I show good answer if the student took the bad one and need to show when is good.

I was thinking about make a middleware where this one does the correction and post a result document.

Do you have any other strategies how I can handle this?

Answers


You don't need a middleware to do that. All you need to do is to redirect the user to the result page with the student id.

Since you know the student id and their answers, you can render the result page according to the answers they have submitted.


Need Your Help

Insert non-repeating data into table

mysql sql insert on-duplicate-key

I've got a file that I've succesfully updated to a table. Now, I'm required to do it again in a way that the data is not being repeated.

How can I launch a task/layout from my actionbar settings

java android eclipse menu android-actionbar

So I have enabled the ActionBar settings panel. And I've edited my main.xml to look like this.