Random question is not adding each question from each sub-category!!

Random question is not adding each question from each sub-category!!

by Nagesh Japa -
Number of replies: 2

Hello @All,

I have chose + a random question option while creating quiz selected a parent category, used check box Include questions from subcategories too option and I have given Number of random questions count to 30, I have 30 sub categories. I was thinking the mechanism in random question will choose randomly each question from each sub-category , but it is not selecting the way I am thinking.

Please anyone explain me the mechanism of random selection, will it select randomly any number of questions from any category based on the count specified or the selection will be number of questions count divide by number of sub categories?

Thanks in advance.

Average of ratings: -
In reply to Nagesh Japa

Re: Random question is not adding each question from each sub-category!!

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hi Nagesh,

I believe the random question takes all of the questions from all sub categories, puts them in one pool and selects one at random with equal probability for each questions. If you want one question chosen from each subcategory, create one random question for each category. You can randomize the order of the quiz/section if that is desired.
Average of ratings: Useful (3)
In reply to Daniel Thies

Re: Random question is not adding each question from each sub-category!!

by Nagesh Japa -
Hi Daniel Thies,

Thanks for the solution, what I have expected was correct based on your first statement.
I have tested selecting random question for each sub-category, awesome it worked the way I wanted.

Thanks for the help smile