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

Public Member Functions

 get_typeid ()
 get_typestring ()
 get_idstring ()
 display ($renderer, $attempt)
 check_answer ()
 display_answers (html_table $table)
 update ($properties)
 stats (array &$pagestats, $tries)
 report_answers ($answerpage, $answerdata, $useranswer, $pagestats, &$i, &$n)

Protected Attributes

 $type = lesson_page::TYPE_QUESTION
 $typeidstring = 'truefalse'
 $typeid = LESSON_PAGE_TRUEFALSE
 $string = null

Detailed Description

Definition at line 32 of file truefalse.php.


Member Function Documentation

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.

Returns:
stdClass

Reimplemented from lesson_page.

Definition at line 64 of file truefalse.php.

Here is the call graph for this function:

display ( renderer,
attempt 
)

This method gets called to display the page to the user taking the lesson

Parameters:
object$renderer
object$attempt
Returns:
string

Reimplemented from lesson_page.

Definition at line 51 of file truefalse.php.

Here is the call graph for this function:

Updates a table with the answers for this page

Parameters:
html_table$table
Returns:
html_table

Reimplemented from lesson_page.

Definition at line 102 of file truefalse.php.

Here is the call graph for this function:

Definition at line 48 of file truefalse.php.

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

Returns:
int

Reimplemented from lesson_page.

Definition at line 39 of file truefalse.php.

This method should return the string that describes the pagetype

Returns:
string

Reimplemented from lesson_page.

Definition at line 42 of file truefalse.php.

report_answers ( answerpage,
answerdata,
useranswer,
pagestats,
&$  i,
&$  n 
)

Formats the answers of this page for a report

Parameters:
object$answerpage
object$answerdata
object$useranswer
array$pagestats
int$iCount of first level answers
int$nCount of second level answers
Returns:
object The answer page for this

Reimplemented from lesson_page.

Definition at line 236 of file truefalse.php.

Here is the call graph for this function:

stats ( array &$  pagestats,
tries 
)

Adds stats for this page to the &pagestats object. This should be defined for all page types that grade

Parameters:
array$pagestats
int$tries
Returns:
bool

Reimplemented from lesson_page.

Definition at line 205 of file truefalse.php.

Here is the call graph for this function:

update ( properties)

Updates the page and its answers

moodle_database $DB moodle_page $PAGE

Parameters:
stdClass$properties
Returns:
bool

Definition at line 156 of file truefalse.php.

Here is the call graph for this function:


Field Documentation

$string = null [protected]

Definition at line 37 of file truefalse.php.

$type = lesson_page::TYPE_QUESTION [protected]

Reimplemented from lesson_page.

Definition at line 34 of file truefalse.php.

$typeid = LESSON_PAGE_TRUEFALSE [protected]

Definition at line 36 of file truefalse.php.

$typeidstring = 'truefalse' [protected]

Definition at line 35 of file truefalse.php.


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