Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402] [Versions 402 and 403]
(no description)
File Size: | 225 lines (7 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
slot_random:: (7 methods):
__construct()
get_quiz()
set_quiz()
set_tags()
set_tags_by_id()
set_filter_condition()
insert()
Class: slot_random - X-Ref
Class slot_random, represents a random question slot type.__construct($slotrecord = null) X-Ref |
slot_random constructor. param: \stdClass $slotrecord Represents a record in the quiz_slots table. |
get_quiz() X-Ref |
Returns the quiz for this question slot. The quiz is fetched the first time it is requested and then stored in a member variable to be returned each subsequent time. return: mixed |
set_quiz($quiz) X-Ref |
Sets the quiz object for the quiz slot. It is not mandatory to set the quiz as the quiz slot can fetch it the first time it is accessed, however it helps with the performance to set the quiz if you already have it. param: \stdClass $quiz The qui object. |
set_tags($tags) X-Ref |
Set some tags for this quiz slot. param: \core_tag_tag[] $tags |
set_tags_by_id($tagids) X-Ref |
Set some tags for this quiz slot. This function uses tag ids to find tags. param: int[] $tagids |
set_filter_condition($filters) X-Ref |
Set filter condition. param: \stdClass $filters |
insert($page) X-Ref |
Inserts the quiz slot at the $page page. It is required to call this function if you are building a quiz slot object from scratch. param: int $page The page that this slot will be inserted at. |