Lines Matching refs:slots
47 private $slots; variable in mod_quiz\\repaginate
52 * @param stdClass[] $slots the quiz_slots for that quiz.
54 public function __construct($quizid = 0, $slots = null) { argument
58 $this->slots = array();
60 if (!$slots) {
61 $this->slots = $DB->get_records('quiz_slots', array('quizid' => $this->quizid), 'slot');
63 $this->slots = $slots;
81 * @param array $slots
85 protected function get_this_slot($slots, $slotnumber) { argument
86 foreach ($slots as $key => $slot) {
96 * @param stdClass[] $slots
99 protected function get_slots_by_slot_number($slots) { argument
100 if (!$slots) {
104 foreach ($slots as $slot) {
112 * @param stdClass[] $slots
115 protected function get_slots_by_slotid($slots) { argument
116 if (!$slots) {
120 foreach ($slots as $slot) {
133 $this->slots = $DB->get_records('quiz_slots', array('quizid' => $this->quizid), 'slot');
136 foreach ($this->slots as $slot) {
150 …$newslots = array_merge($newslots, $this->repaginate_the_rest($this->slots, $nextslotnumber, $type…
151 $this->slots = $this->get_slots_by_slotid($newslots);
166 $currentslot = $this->get_this_slot($this->slots, $currentslotnumber);
167 $nextslot = $this->get_this_slot($this->slots, $nextslotnumber);
179 * @param stdClass[] $slots the slots to repaginate.
183 public function repaginate_n_question_per_page($slots, $number) { argument
184 $slots = $this->get_slots_by_slot_number($slots);
188 foreach ($slots as $key => $slot) {