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

Test helper class for the calculated multiple-choice question type. More...

Inheritance diagram for qtype_calculatedmulti_test_helper:
question_test_helper

Public Member Functions

 get_test_questions ()
 
 make_calculatedmulti_question_multiresponse ()
 Makes a calculated multiple-choice question with multiple right answers.
 
 make_calculatedmulti_question_singleresponse ()
 Makes a calculated multiple-choice question about summing two numbers.
 

Static Public Member Functions

static get_question_editing_form ($cat, $questiondata)
 Set up a form to create a question in $cat.
 

Detailed Description

Test helper class for the calculated multiple-choice question type.

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

Member Function Documentation

◆ 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_calculatedmulti_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_calculatedmulti_question_multiresponse()

qtype_calculatedmulti_test_helper::make_calculatedmulti_question_multiresponse ( )

Makes a calculated multiple-choice question with multiple right answers.

Return values
qtype_calculatedmulti_multi_question

◆ make_calculatedmulti_question_singleresponse()

qtype_calculatedmulti_test_helper::make_calculatedmulti_question_singleresponse ( )

Makes a calculated multiple-choice question about summing two numbers.

Return values
qtype_calculatedmulti_single_question

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