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


Public Member Functions | |
| get_question_subpaths () | |
| process_question (array $data, array $raw) | |
| __construct (moodle1_question_bank_handler $qbankhandler, $qtype) | |
| implementation details follow ////////////////////////////////////////// | |
| get_paths () | |
| use_xml_writer (xml_writer $xmlwriter) | |
Protected Member Functions | |
| write_answers (array $answers, $qtype) | |
| write_numerical_units (array $numericalunits) | |
| write_numerical_options (array $numericaloption) | |
| get_default_numerical_options ($oldquestiontextformat, $units) | |
| write_dataset_definitions (array $datasetdefinitions) | |
| open_xml_writer () | |
| close_xml_writer () | |
Protected Attributes | |
| $qbankhandler | |
Base class for all question type handlers
Definition at line 1699 of file handlerlib.php.
| __construct | ( | moodle1_question_bank_handler $ | qbankhandler, |
| $ | qtype | ||
| ) |
implementation details follow //////////////////////////////////////////
Definition at line 1841 of file handlerlib.php.

| close_xml_writer | ( | ) | [final, protected] |
Question type handlers cannot close the xml_writer
Reimplemented from moodle1_xml_handler.
Definition at line 1864 of file handlerlib.php.
| get_default_numerical_options | ( | $ | oldquestiontextformat, |
| $ | units | ||
| ) | [protected] |
Returns default numerical_option structure
This structure is not present in moodle.xml, we create a new artificial one here.
| int | $oldquestiontextformat |
Definition at line 1784 of file handlerlib.php.

| get_paths | ( | ) | [final] |
Definition at line 1850 of file handlerlib.php.
Returns the list of paths within one <QUESTION> that this qtype needs to have included in the grouped question structure
Reimplemented in moodle1_qtype_calculated_handler, moodle1_qtype_essay_handler, moodle1_qtype_match_handler, moodle1_qtype_multianswer_handler, moodle1_qtype_multichoice_handler, moodle1_qtype_numerical_handler, moodle1_qtype_shortanswer_handler, and moodle1_qtype_truefalse_handler.
Definition at line 1710 of file handlerlib.php.
| open_xml_writer | ( | ) | [final, protected] |
Question type handlers cannot open the xml_writer
Definition at line 1857 of file handlerlib.php.
| process_question | ( | array $ | data, |
| array $ | raw | ||
| ) |
Gives the qtype handler a chance to write converted data into questions.xml
| array | $data | grouped question data |
| array | $raw | grouped raw QUESTION data |
Reimplemented in moodle1_qtype_multianswer_handler, moodle1_qtype_calculated_handler, moodle1_qtype_numerical_handler, moodle1_qtype_match_handler, moodle1_qtype_multichoice_handler, moodle1_qtype_shortanswer_handler, moodle1_qtype_truefalse_handler, and moodle1_qtype_essay_handler.
Definition at line 1720 of file handlerlib.php.
| use_xml_writer | ( | xml_writer $ | xmlwriter | ) |
Provides a xml_writer instance to this qtype converter
| xml_writer | $xmlwriter |
Definition at line 1873 of file handlerlib.php.
| write_answers | ( | array $ | answers, |
| $ | qtype | ||
| ) | [protected] |
Converts the answers and writes them into the questions.xml
The structure "answers" is used by several qtypes. It contains data from {question_answers} table.
| array | $answers | as parsed by the grouped parser in moodle.xml |
| string | $qtype | containing the answers |
Definition at line 1731 of file handlerlib.php.


| write_dataset_definitions | ( | array $ | datasetdefinitions | ) | [protected] |
Writes the dataset_definitions structure
| array | $datasetdefinitions | array of dataset_definition structures |
Definition at line 1818 of file handlerlib.php.


| write_numerical_options | ( | array $ | numericaloption | ) | [protected] |
Writes the numerical_options structure
| array | $numericaloption |
Definition at line 1766 of file handlerlib.php.


| write_numerical_units | ( | array $ | numericalunits | ) | [protected] |
Writes the grouped numerical_units structure
| array | $numericalunits |
Definition at line 1748 of file handlerlib.php.


$qbankhandler [protected] |
Definition at line 1702 of file handlerlib.php.