Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Static Public Member Functions | List of all members
qtype_match_test_helper Class Reference

Test helper class for the match question type. More...

Inheritance diagram for qtype_match_test_helper:
question_test_helper

Public Member Functions

 get_match_question_data_foursubq ()
 Makes a match question about completing two blanks in some text. More...
 
 get_match_question_data_trickynums ()
 Makes a matching question with choices including '0' and '0.0'. More...
 
 get_match_question_form_data_foursubq ()
 Makes a match question about completing two blanks in some text. More...
 
 get_match_question_form_data_trickynums ()
 Makes a match question about completing two blanks in some text. More...
 
 get_test_questions ()
 

Static Public Member Functions

static get_question_editing_form ($cat, $questiondata)
 Set up a form to create a question in $cat. More...
 
static make_match_question_foursubq ()
 Makes a matching question to classify 'Dog', 'Frog', 'Toad' and 'Cat' as 'Mammal', 'Amphibian' or 'Insect'. More...
 
static make_match_question_trickynums ()
 Makes a matching question with choices including '0' and '0.0'. More...
 

Detailed Description

Test helper class for the match question type.

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

Member Function Documentation

◆ get_match_question_data_foursubq()

qtype_match_test_helper::get_match_question_data_foursubq ( )

Makes a match question about completing two blanks in some text.

Return values
objectthe question definition data, as it might be returned from get_question_options.

◆ get_match_question_data_trickynums()

qtype_match_test_helper::get_match_question_data_trickynums ( )

Makes a matching question with choices including '0' and '0.0'.

Return values
objectthe question definition data, as it might be returned from get_question_options.

◆ get_match_question_form_data_foursubq()

qtype_match_test_helper::get_match_question_form_data_foursubq ( )

Makes a match question about completing two blanks in some text.

Return values
objectthe question definition data, as it might be returned from the question editing form.

◆ get_match_question_form_data_trickynums()

qtype_match_test_helper::get_match_question_form_data_trickynums ( )

Makes a match question about completing two blanks in some text.

Return values
objectthe question definition data, as it might be returned from the question editing form.

◆ get_question_editing_form()

static question_test_helper::get_question_editing_form (   $cat,
  $questiondata 
)
staticinherited

Set up a form to create a question in $cat.

This method also sets cat and contextid on $questiondata object.

Parameters
object$catthe category
object$questiondataform initialisation requires question data.
Return values
moodleform

◆ get_test_questions()

qtype_match_test_helper::get_test_questions ( )
Return values
arrayof example question names that can be passed as the $which argument of test_question_maker::make_question when $qtype is this question type.

Reimplemented from question_test_helper.

◆ make_match_question_foursubq()

static qtype_match_test_helper::make_match_question_foursubq ( )
static

Makes a matching question to classify 'Dog', 'Frog', 'Toad' and 'Cat' as 'Mammal', 'Amphibian' or 'Insect'.

defaultmark 1. Stems are shuffled by default.

Return values
qtype_match_question

◆ make_match_question_trickynums()

static qtype_match_test_helper::make_match_question_trickynums ( )
static

Makes a matching question with choices including '0' and '0.0'.

Return values
qtype_match_question

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