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


Public Member Functions | |
| provide_import () | |
| provide_export () | |
| export_file_extension () | |
| readquestion ($lines) | |
| write_name ($name) | |
| write_questiontext ($text, $format, $defaultformat=FORMAT_MOODLE) | |
| writequestion ($question) | |
Protected Member Functions | |
| answerweightparser (&$answer) | |
| commentparser ($answer, $defaultformat) | |
| split_truefalse_comment ($answer, $defaultformat) | |
| escapedchar_pre ($string) | |
| escapedchar_post ($string) | |
| check_answer_count ($min, $answers, $text) | |
| parse_text_with_format ($text, $defaultformat=FORMAT_MOODLE) | |
| add_blank_combined_feedback ($question) | |
| repchar ($text, $notused=0) | |
| format_const_to_name ($format) | |
| format_name_to_const ($format) | |
The GIFT import filter was designed as an easy to use method for teachers writing questions as a text file. It supports most question types and the missing word format.
Multiple Choice / Missing Word Who's buried in Grant's tomb?{~Grant ~Jefferson =no one} Grant is {~buried =entombed ~living} in Grant's tomb. True-False: Grant is buried in Grant's tomb.{FALSE} Short-Answer. Who's buried in Grant's tomb?{=no one =nobody} Numerical When was Ulysses S. Grant born?{#1822:5} Matching Match the following countries with their corresponding capitals.{=Canada->Ottawa =Italy->Rome =Japan->Tokyo}
Comment lines start with a double backslash (//). Optional question names are enclosed in double colon(::). Answer feedback is indicated with hash mark (#). Percentage answer weights immediately follow the tilde (for multiple choice) or equal sign (for short answer and numerical), and are enclosed in percent signs (% %). See docs and examples.txt for more.
This filter was written through the collaboration of numerous members of the Moodle community. It was originally based on the missingword format, which included code from Thomas Robb and others. Paul Tsuchido Shew wrote this filter in December 2003.
Definition at line 63 of file format.php.
| add_blank_combined_feedback | ( | $ | question | ) | [protected] |
| answerweightparser | ( | &$ | answer | ) | [protected] |
| check_answer_count | ( | $ | min, |
| $ | answers, | ||
| $ | text | ||
| ) | [protected] |
Definition at line 133 of file format.php.


| commentparser | ( | $ | answer, |
| $ | defaultformat | ||
| ) | [protected] |
Definition at line 86 of file format.php.


| escapedchar_post | ( | $ | string | ) | [protected] |
| escapedchar_pre | ( | $ | string | ) | [protected] |
Reimplemented from qformat_default.
Definition at line 73 of file format.php.
| format_const_to_name | ( | $ | format | ) | [protected] |
| int | $format | one of the FORMAT_ constants. |
Definition at line 567 of file format.php.

| format_name_to_const | ( | $ | format | ) | [protected] |
| int | $format | one of the FORMAT_ constants. |
Definition at line 585 of file format.php.

| parse_text_with_format | ( | $ | text, |
| $ | defaultformat = FORMAT_MOODLE |
||
| ) | [protected] |
Definition at line 143 of file format.php.


| provide_export | ( | ) |
Reimplemented from qformat_default.
Definition at line 69 of file format.php.
| provide_import | ( | ) |
Reimplemented from qformat_default.
Definition at line 65 of file format.php.
| readquestion | ( | $ | lines | ) |
Reimplemented from qformat_default.
Definition at line 162 of file format.php.

| repchar | ( | $ | text, |
| $ | notused = 0 |
||
| ) | [protected] |
| split_truefalse_comment | ( | $ | answer, |
| $ | defaultformat | ||
| ) | [protected] |
Definition at line 97 of file format.php.


| write_name | ( | $ | name | ) |
Definition at line 599 of file format.php.


| write_questiontext | ( | $ | text, |
| $ | format, | ||
| $ | defaultformat = FORMAT_MOODLE |
||
| ) |
Definition at line 603 of file format.php.


| writequestion | ( | $ | question | ) |
convert a single question object into text output in the given format. This must be overriden
| object | question question object |
Reimplemented from qformat_default.
Definition at line 612 of file format.php.
