Urgent Customizing $quiz->array

Urgent Customizing $quiz->array

by Shariq Ghani -
Number of replies: 3
HI

I want to customize the quiz as per my requirements.

I need to restrict my quiz to take 270 questions from the randomly generated questions, no matter what the numbers of questions are in the quiz but system should only displays the 270 questions.

Like if I have 500 questions in my question bank so system should picked 270 random questions from the question bank.

i need to know where this array is defined in the code so i can restrict it to 270.
Average of ratings: -
In reply to Shariq Ghani

Re: Urgent Customizing $quiz->array

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You don't need to touch the code. Just use the add random questions feature: http://docs.moodle.org/en/Editing_a_quiz#Adding_random_questions. Obviously, to get up to 270, you will need to add 100, then 100 then 70.
In reply to Tim Hunt

Re: Urgent Customizing $quiz->array

by Shariq Ghani -
You are right but i want to add 500 random questions to my question bank and then system should pick 270 questions out of 500 for the quiz.

as question bank gets bigger and bigger say after a while i add some more 100 questions so the total random questions are 600 now but for my quiz i want to pick 270 out of 600 questions.

do you understand me?
In reply to Shariq Ghani

Re: Urgent Customizing $quiz->array

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Shariq - I believe I understand you and the link Tim gave you should allow you to do exactly what you hoping to do. You can select and add to a quiz 270 random questions out of a category regardless of the number of questions in that category (well, provided there are at least 270). Moodle is designed to do this so it should not require any customization. Peace - Anthony