|
| __construct ($slotrecord=null) |
| slot_random constructor.
|
|
| get_quiz () |
| Returns the quiz for this question slot.
|
|
| insert ($page) |
| Inserts the quiz slot at the $page page.
|
|
| set_filter_condition (string $filters) |
| Set filter condition.
|
|
| set_quiz ($quiz) |
| Sets the quiz object for the quiz slot.
|
|
| set_tags ($tags) |
| Set some tags for this quiz slot.
|
|
| set_tags_by_id ($tagids) |
| Set some tags for this quiz slot.
|
|
|
string | $filtercondition = null |
| filter condition
|
|
stdClass | $quiz = null |
| The quiz this question slot belongs to.
|
|
stdClass | $record |
| Slot's properties.
|
|
stdClass | $referencerecord |
| set reference record
|
|
core_tag_tag[] | $tags = [] |
| List of tags for this slot.
|
|
◆ __construct()
mod_quiz\local\structure\slot_random::__construct |
( |
| $slotrecord = null | ) |
|
slot_random constructor.
- Parameters
-
stdClass | $slotrecord | Represents a record in the quiz_slots table. |
◆ get_quiz()
mod_quiz\local\structure\slot_random::get_quiz |
( |
| ) |
|
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 values
-
- Exceptions
-
◆ insert()
mod_quiz\local\structure\slot_random::insert |
( |
| $page | ) |
|
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.
- Parameters
-
int | $page | The page that this slot will be inserted at. |
◆ set_filter_condition()
mod_quiz\local\structure\slot_random::set_filter_condition |
( |
string | $filters | ) |
|
Set filter condition.
- Parameters
-
◆ set_quiz()
mod_quiz\local\structure\slot_random::set_quiz |
( |
| $quiz | ) |
|
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.
- Parameters
-
stdClass | $quiz | The qui object. |
◆ set_tags()
mod_quiz\local\structure\slot_random::set_tags |
( |
| $tags | ) |
|
◆ set_tags_by_id()
mod_quiz\local\structure\slot_random::set_tags_by_id |
( |
| $tagids | ) |
|
◆ $record
stdClass mod_quiz\local\structure\slot_random::$record |
|
protected |
Slot's properties.
A record retrieved from the quiz_slots table.
The documentation for this class was generated from the following file:
- mod/quiz/classes/local/structure/slot_random.php