Hi,

Can anyone help me to explain this

I have a query about how exactly moodle pulls questions from its categories and subcategories. (criteria of no of question from its categories).

I don't think I ask properly, so let me give you a detailed query which I was trying to find but couldn't find anywhere.

In a course, I want to make a quiz(course test) from all its categories

I have a course category(0) and 7 subcategories

1. sub-cat1: 20 questions

2. sub-cat2: 2 questions

3. sub-cat3: 50 questions

4. sub-cat4: 15 questions

5. sub-cat5: 200 questions

6. sub-cat6: 19 questions

7. sub-cat7: 16 questions

So from these categories, I would like to create a 50 questions quiz.

how exactly moodle will pull 50 random questions from all these subcategories.

I mean how many questions from each category.

will it divide 50(question)/7(sub-cat) = 7.14, from each category at least 7 questions from each sub-cat.

or will it work like

Subcategories | no'of questions | formula | trimmed |

1. sub-cat1: | 20 | 3.105590062 | 3 |

2. sub-cat2: | 2 | 0.3105590062 | 1 |

3. sub-cat3: | 50 | 7.763975155 | 8 |

4. sub-cat4: | 15 | 2.329192547 | 2 |

5. sub-cat5: | 200 | 31.05590062 | 31 |

6. sub-cat6: | 19 | 2.950310559 | 3 |

7. sub-cat7: | 16 | 2.48447205 | 2 |

Total | 322 | 50 | 50 |

(20/322)*50 | (A2/322)*50 | ||

(2/322)*50 | |||

(50/322)*50 | |||

. | |||

. | |||

. | |||

. |

**Please help me to understand this method(which Moodle applies while working on random questions selection).**

Thanks, in advance

praveen