mardi 24 mai 2016

Select random object from list based on conditions [duplicate]

This question already has an answer here:

Hi guys i'm developing a tests generator app using asp mvc. And i need to select random questions based on some conditions randomly using some test template. Each question has a domain and a difficulty. A test template has the following structure.

NoOfQuestions
QuestionDomain
NoOfQuestionsPerDomain
QuestionDifficulty
NoOfQuestionsPerDifficulty

NoOfQuestions = NoOfQuestionsPerDomain + NoOfQuestionsPerDificulty.

My question is how can i choose a random question set based on the properties above ? thanks!




Aucun commentaire:

Enregistrer un commentaire