Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
qtype_randomsamatch_question_loader Class Reference

This class is responsible for loading the questions that a question needs from the database. More...

Inheritance diagram for qtype_randomsamatch_question_loader:
qtype_randomsamatch_test_question_loader

Public Member Functions

 __construct ($availablequestions, $choose)
 Constructor.
 
 load_questions ()
 Choose and load the desired number of questions.
 

Protected Attributes

array $availablequestions
 hold available shortanswers questionid to choose from.
 
int $choose
 how many questions to load.
 

Detailed Description

This class is responsible for loading the questions that a question needs from the database.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

qtype_randomsamatch_question_loader::__construct ( $availablequestions,
$choose )

Constructor.

Parameters
array$availablequestionsarray of available question ids.
int$choosehow many questions to load.

Member Function Documentation

◆ load_questions()

qtype_randomsamatch_question_loader::load_questions ( )

Choose and load the desired number of questions.

Return values
arrayof short answer questions.

Reimplemented in qtype_randomsamatch_test_question_loader.


The documentation for this class was generated from the following file: