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

Public Member Functions

 custom_definition ()
 is_standard ()
 definition ()
 construction_override ()

Data Fields

 $qtype
 $qtypestring

Protected Member Functions

 add_jumpto ($name, $label=null, $selected=LESSON_NEXTPAGE)
 add_score ($name, $label=null, $value=null)
 add_answer ($count, $label=NULL, $required=false)
 add_response ($count, $label=NULL, $required=false)

Protected Attributes

 $editoroptions = array()
 $standard = true

Detailed Description

Abstract class that page type's MUST inherit from.

This is the abstract class that ALL add page type forms must extend. You will notice that all but two of the methods this class contains are final. Essentially the only thing that extending classes can do is extend custom_definition. OR if it has a special requirement on creation it can extend construction_override

Definition at line 664 of file locallib.php.


Member Function Documentation

add_answer ( count,
label = NULL,
required = false 
) [final, protected]

Convenience function: Adds an answer editor

Parameters:
int$countThe count of the element to add
string$label,NULLmeans default
bool$required
Returns:
void

Definition at line 796 of file locallib.php.

Here is the caller graph for this function:

add_jumpto ( name,
label = null,
selected = LESSON_NEXTPAGE 
) [final, protected]

Convenience function: Adds a jumpto select element

Parameters:
string$name
string | null$label
int$selectedThe page to select by default

Definition at line 755 of file locallib.php.

Here is the caller graph for this function:

add_response ( count,
label = NULL,
required = false 
) [final, protected]

Convenience function: Adds an response editor

Parameters:
int$countThe count of the element to add
string$label,NULLmeans default
bool$required
Returns:
void

Definition at line 814 of file locallib.php.

Here is the caller graph for this function:

add_score ( name,
label = null,
value = null 
) [final, protected]

Convenience function: Adds a score input element

Parameters:
string$name
string | null$label
mixed$valueThe default value

Definition at line 775 of file locallib.php.

Here is the caller graph for this function:

A function that gets called upon init of this object by the calling script.

This can be used to process an immediate action if required. Currently it is only used in special cases by non-standard page types.

Returns:
bool

Definition at line 833 of file locallib.php.

definition ( ) [final]

Add the required basic elements to the form.

This method adds the basic elements to the form including title and contents and then calls custom_definition();

Reimplemented from moodleform.

Definition at line 712 of file locallib.php.

Here is the call graph for this function:

is_standard ( ) [final]

Used to determine if this is a standard page or a special page

Returns:
bool

Definition at line 702 of file locallib.php.


Field Documentation

$editoroptions = array() [protected]

Definition at line 683 of file locallib.php.


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