See Release Notes
Long Term Support Release
Differences Between: [Versions 401 and 402] [Versions 401 and 403]
Defines the quiz repaginate class.
Copyright: | 2014 The Open University |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 234 lines (7 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
repaginate:: (9 methods):
__construct()
repaginate_this_slot()
get_this_slot()
get_slots_by_slot_number()
get_slots_by_slotid()
repaginate_slots()
repaginate_next_slot()
repaginate_n_question_per_page()
repaginate_the_rest()
Class: repaginate - X-Ref
The repaginate class will rearrange questions in pages.__construct($quizid = 0, $slots = null) X-Ref |
Constructor. param: int $quizid the id of the quiz being manipulated. param: stdClass[] $slots the quiz_slots for that quiz. |
repaginate_this_slot($slot, $newpagenumber) X-Ref |
Repaginate a given slot with the given pagenumber. param: stdClass $slot param: int $newpagenumber return: stdClass |
get_this_slot($slots, $slotnumber) X-Ref |
Return current slot object. param: array $slots param: int $slotnumber return: stdClass $slot |
get_slots_by_slot_number($slots) X-Ref |
Return array of slots with slot number as key param: stdClass[] $slots return: stdClass[] |
get_slots_by_slotid($slots) X-Ref |
Return array of slots with slot id as key param: stdClass[] $slots return: stdClass[] |
repaginate_slots($nextslotnumber, $type) X-Ref |
Repaginate, update DB and slots object param: int $nextslotnumber param: int $type repaginate::LINK or repaginate::UNLINK. |
repaginate_next_slot($nextslotnumber, $type) X-Ref |
Repaginate next slot and return the modified slot object param: int $nextslotnumber param: int $type repaginate::LINK or repaginate::UNLINK. return: stdClass|null |
repaginate_n_question_per_page($slots, $number) X-Ref |
Return the slots with the new pagination, regardless of current pagination. param: stdClass[] $slots the slots to repaginate. param: int $number number of question per page return: stdClass[] the updated slots. |
repaginate_the_rest($quizslots, $slotfrom, $type, $dbupdate = true) X-Ref |
Repaginate the rest. param: stdClass[] $quizslots param: int $slotfrom param: int $type param: bool $dbupdate return: stdClass[] |