Moodle  2.2.1
http://www.collinsharper.com
qformat_xml_test Class Reference
Inheritance diagram for qformat_xml_test:
Collaboration diagram for qformat_xml_test:

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)

Detailed Description

Unit tests for the matching question definition class.

Definition at line 40 of file testxmlformat.php.


Member Function Documentation

assert_same_xml ( expectedxml,
xml 
)

Definition at line 41 of file testxmlformat.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters:
mixed$varany data structure.
Returns:
mixed an equivalent structure with the relacements made.

Definition at line 90 of file testxmlformat.php.

Here is the caller graph for this function:

Definition at line 46 of file testxmlformat.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters:
object$expectedqas returned by get_question_form_data.
Returns:
object one more likely to match the return value of import_...().

Definition at line 76 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 284 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 406 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 554 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 1368 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 788 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 959 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 1090 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 1210 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 251 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 322 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 361 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 176 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 206 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 457 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 1267 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 677 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 236 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 893 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 1031 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 1159 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 114 of file testxmlformat.php.

Here is the call graph for this function:

Definition at line 140 of file testxmlformat.php.

Here is the call graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations