To find a logic that can randomly pick the question out of 3 questions:
- If 1st question is answered wrong then just increase the attempt counter in database table.
- Pick the 2nd question randomly, if wrong increase the attempt counter in database table.
- Pick the 3rd question, if wrong increase the attempt in counter database table.
- Again pick a random question in the 3 questions.But it should not be the previous question that we showed to user. And if wrong increase the attempt counter in database table
- Again Show the next randomly picked question and increase attempt counter in database table
For Example : Assume that Q2 is displayed in 1st attempt then the flow would be 1st Attempt >> Q2
2nd Attempt >> either Q1/Q3 (Assume Q3)
3rd Attempt >> then it would be Q1 for this attempt
4th Attempt >> as Q3 was displayed in 2nd attempt,we need to display Q2 now
5th Attempt >> either Q3/Q1
Security questions & answers are pulled from different database through services, hence I will get a List of Class(something like ChallengeQuestion) having it members as Answer,QID,QuestionText. Will have to incorporate above logic in a MVC project. I am new to MVC, any Help will be greatly appreciated.. Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire