|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| assert_same_xml ($expectedxml, $xml) | |
| make_test_question () | |
| remove_irrelevant_form_data_fields ($expectedq) | |
| test_write_hint_basic () | |
| test_write_hint_with_parts () | |
| test_import_hints_no_parts () | |
| test_import_hints_with_parts () | |
| test_import_no_hints_no_error () | |
| test_import_description () | |
| test_export_description () | |
| test_import_essay_20 () | |
| test_import_essay_21 () | |
| test_export_essay () | |
| test_import_match_19 () | |
| test_export_match () | |
| test_import_multichoice_19 () | |
| test_export_multichoice () | |
| test_import_numerical_19 () | |
| test_export_numerical () | |
| test_import_shortanswer_19 () | |
| test_export_shortanswer () | |
| test_import_truefalse_19 () | |
| test_export_truefalse () | |
| test_import_multianswer () | |
| test_export_multianswer () | |
Protected Member Functions | |
| itemid_to_files ($var) | |
Unit tests for the matching question definition class.
Definition at line 40 of file testxmlformat.php.
| assert_same_xml | ( | $ | expectedxml, |
| $ | xml | ||
| ) |
Definition at line 41 of file testxmlformat.php.


| itemid_to_files | ( | $ | var | ) | [protected] |
Becuase XML import uses a files array instead of an itemid integer to handle saving files with a question, we need to covert the output of test_question_maker::get_question_form_data to match. This method recursively replaces all array elements with key itemid with an array entry with key files and value an empty array.
| mixed | $var | any data structure. |
Definition at line 90 of file testxmlformat.php.

Definition at line 46 of file testxmlformat.php.


| remove_irrelevant_form_data_fields | ( | $ | expectedq | ) |
The data the XML import format sends to save_question is not exactly the same as the data returned from the editing form, so this method makes necessary changes to the return value of test_question_maker::get_question_form_data so that the tests can work.
| object | $expectedq | as returned by get_question_form_data. |
Definition at line 76 of file testxmlformat.php.
