Class slot_random, represents a random question slot type.
More...
|
stdClass | $quiz = null |
| The quiz this question slot belongs to.
|
|
stdClass | $record |
| Slot's properties. More...
|
|
core_tag_tag[] | $tags = [] |
| List of tags for this slot.
|
|
Class slot_random, represents a random question slot type.
- Copyright
- 2018 Shamim Rezaie shami.nosp@m.m@mo.nosp@m.odle..nosp@m.com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __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_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 some tags for this quiz slot.
- Parameters
-
◆ set_tags_by_id()
mod_quiz\local\structure\slot_random::set_tags_by_id |
( |
|
$tagids | ) |
|
Set some tags for this quiz slot.
This function uses tag ids to find tags.
- Parameters
-
◆ $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: