Test helper class for the numerical question type.
More...
Test helper class for the numerical question type.
- Copyright
- 2011 The Open University
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ get_numerical_question_form_data_pi()
qtype_numerical_test_helper::get_numerical_question_form_data_pi |
( |
| ) |
|
Get the form data that corresponds to saving a numerical question.
This question asks for Pi to two decimal places. It has feedback for various wrong responses. There is hint data there, but it is all blank, so no hints are created if this question is saved.
- Return values
-
stdClass | simulated question form data. |
◆ get_numerical_question_form_data_pi3tries()
qtype_numerical_test_helper::get_numerical_question_form_data_pi3tries |
( |
| ) |
|
Get the form data that corresponds to saving a numerical question.
Like get_numerical_question_form_data_pi(), but this time with two hints, making this suitable for use with the Interactive with multiple tries behaviour.
- Return values
-
stdClass | simulated question form data. |
◆ 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 | $cat | the category |
object | $questiondata | form initialisation requires question data. |
- Return values
-
◆ get_test_questions()
qtype_numerical_test_helper::get_test_questions |
( |
| ) |
|
◆ make_numerical_question_currency()
qtype_numerical_test_helper::make_numerical_question_currency |
( |
| ) |
|
Makes a numerical question with correct ansewer 3.14, and various incorrect answers with different feedback.
- Return values
-
◆ make_numerical_question_pi()
qtype_numerical_test_helper::make_numerical_question_pi |
( |
| ) |
|
Makes a numerical question with correct ansewer 3.14, and various incorrect answers with different feedback.
- Return values
-
◆ make_numerical_question_unit()
qtype_numerical_test_helper::make_numerical_question_unit |
( |
| ) |
|
Makes a numerical question with a choice (select menu) of units.
- Return values
-
The documentation for this class was generated from the following file: