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


Public Member Functions | |
| get_typeid () | |
| get_typestring () | |
| get_idstring () | |
| display ($renderer, $attempt) | |
| create_answers ($properties) | |
| check_answer () | |
| option_description_string () | |
| display_answers (html_table $table) | |
| update ($properties) | |
| stats (array &$pagestats, $tries) | |
| report_answers ($answerpage, $answerdata, $useranswer, $pagestats, &$i, &$n) | |
| get_jumps () | |
Protected Member Functions | |
| make_answer_form ($attempt=null) | |
Protected Attributes | |
| $type = lesson_page::TYPE_QUESTION | |
| $typeid = LESSON_PAGE_MATCHING | |
| $typeidstring = 'matching' | |
| $string = null | |
Definition at line 32 of file matching.php.
| check_answer | ( | ) |
This method MUST be overridden by all question page types, or page types that wish to score a page.
The structure of result should always be the same so it is a good idea when overriding this method on a page type to call $result = parent::check_answer(); before modifying it as required.
Reimplemented from lesson_page.
Definition at line 144 of file matching.php.

| create_answers | ( | $ | properties | ) |
Creates answers within the database for this lesson_page. Usually only ever called when creating a new page instance
| object | $properties |
Reimplemented from lesson_page.
Definition at line 100 of file matching.php.

| display | ( | $ | renderer, |
| $ | attempt | ||
| ) |
This method gets called to display the page to the user taking the lesson
| object | $renderer | |
| object | $attempt |
Reimplemented from lesson_page.
Definition at line 51 of file matching.php.

| display_answers | ( | html_table $ | table | ) |
Updates a table with the answers for this page
| html_table | $table |
Reimplemented from lesson_page.
Definition at line 216 of file matching.php.

| get_idstring | ( | ) |
Definition at line 48 of file matching.php.
| get_jumps | ( | ) |
Gets an array of the jumps used by the answers of this page
Reimplemented from lesson_page.
Definition at line 438 of file matching.php.

| get_typeid | ( | ) |
This method should return the integer used to identify the page type within the database and throughout code. This maps back to the defines used in 1.x
Reimplemented from lesson_page.
Definition at line 39 of file matching.php.
| get_typestring | ( | ) |
This method should return the string that describes the pagetype
Reimplemented from lesson_page.
Definition at line 42 of file matching.php.
| make_answer_form | ( | $ | attempt = null | ) | [protected] |
Definition at line 61 of file matching.php.


Get the string that describes the options of this page type
Reimplemented from lesson_page.
Definition at line 212 of file matching.php.
| report_answers | ( | $ | answerpage, |
| $ | answerdata, | ||
| $ | useranswer, | ||
| $ | pagestats, | ||
| &$ | i, | ||
| &$ | n | ||
| ) |
Formats the answers of this page for a report
| object | $answerpage | |
| object | $answerdata | |
| object | $useranswer | |
| array | $pagestats | |
| int | $i | Count of first level answers |
| int | $n | Count of second level answers |
Reimplemented from lesson_page.
Definition at line 372 of file matching.php.

Adds stats for this page to the &pagestats object. This should be defined for all page types that grade
| array | $pagestats | |
| int | $tries |
Reimplemented from lesson_page.
Definition at line 351 of file matching.php.
| update | ( | $ | properties | ) |
Updates the page and its answers
moodle_database $DB moodle_page $PAGE
| stdClass | $properties |
Definition at line 296 of file matching.php.

$string = null [protected] |
Definition at line 37 of file matching.php.
$type = lesson_page::TYPE_QUESTION [protected] |
Reimplemented from lesson_page.
Definition at line 34 of file matching.php.
$typeid = LESSON_PAGE_MATCHING [protected] |
Definition at line 35 of file matching.php.
$typeidstring = 'matching' [protected] |
Definition at line 36 of file matching.php.