Test helper class for the shortanswer question type.
More...
Test helper class for the shortanswer question type.
- Copyright
- 2011 The Open University
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ 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_shortanswer_question_data_frogonly()
qtype_shortanswer_test_helper::get_shortanswer_question_data_frogonly |
( |
| ) |
|
Gets the question data for a shortanswer questionwith just the correct ansewer 'frog', and no other answer matching.
- Return values
-
◆ get_shortanswer_question_data_frogtoad()
qtype_shortanswer_test_helper::get_shortanswer_question_data_frogtoad |
( |
| ) |
|
Gets the question data for a shortanswer question with with correct ansewer 'frog', partially correct answer 'toad' and defaultmark 1.
This question also has a '*' match anything answer.
- Return values
-
◆ get_shortanswer_question_form_data_frogtoad()
qtype_shortanswer_test_helper::get_shortanswer_question_form_data_frogtoad |
( |
| ) |
|
Gets the question form data for a shortanswer question with with correct answer 'frog', partially correct answer 'toad' and defaultmark 1.
This question also has a '*' match anything answer.
- Return values
-
◆ get_test_questions()
qtype_shortanswer_test_helper::get_test_questions |
( |
| ) |
|
◆ make_shortanswer_question_escapedwildcards()
qtype_shortanswer_test_helper::make_shortanswer_question_escapedwildcards |
( |
| ) |
|
Makes a shortanswer question with just the correct ansewer 'frog', and no other answer matching.
- Return values
-
◆ make_shortanswer_question_frogonly()
qtype_shortanswer_test_helper::make_shortanswer_question_frogonly |
( |
| ) |
|
Makes a shortanswer question with just the correct ansewer 'frog', and no other answer matching.
- Return values
-
◆ make_shortanswer_question_frogtoad()
qtype_shortanswer_test_helper::make_shortanswer_question_frogtoad |
( |
| ) |
|
Makes a shortanswer question with correct ansewer 'frog', partially correct answer 'toad' and defaultmark 1.
This question also has a '*' match anything answer.
- Return values
-
The documentation for this class was generated from the following file:
- question/type/shortanswer/tests/helper.php