Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Attributes | List of all members
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. More...
 
 load_questions ()
 Choose and load the desired number of questions. More...
 

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: