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

Public Member Functions

 MoodleQuickForm_grading ($elementName=null, $elementLabel=null, $attributes=null)
 get_gradinginstance ()
 toHtml ()
 setHelpButton ($helpbuttonargs, $function='helpbutton')
 getHelpButton ()
 getElementTemplateType ()
 onQuickFormEvent ($event, $arg, &$caller)

Static Public Member Functions

static _validate ($elementValue, $attributes=null)

Data Fields

 $_helpbutton = ''

Detailed Description

HTML class for a grading element. This is a wrapper for advanced grading plugins. When adding the 'grading' element to the form, developer must pass an object of class gradingform_instance as $attributes['gradinginstance']. Otherwise an exception will be thrown. This object is responsible for implementing functions to render element html and validate it

Author:
Marina Glancy public

Definition at line 43 of file grading.php.


Member Function Documentation

static _validate ( elementValue,
attributes = null 
) [static]

Function registered as rule for this element and is called when this element is being validated. This is a wrapper to pass the validation to the method gradingform_instance::validate_grading_element

Parameters:
mixed$elementValue
array$attributes

Definition at line 157 of file grading.php.

Helper function to retrieve gradingform_instance passed in element attributes

Returns:
gradingform_instance

Definition at line 75 of file grading.php.

Here is the caller graph for this function:

The renderer of gradingform_instance will take care itself about different display in normal and frozen states

Returns:
string

Definition at line 120 of file grading.php.

get html for help button

public

Returns:
string html for help button

Definition at line 110 of file grading.php.

MoodleQuickForm_grading ( elementName = null,
elementLabel = null,
attributes = null 
)

Class constructor

Parameters:
string$elementNameInput field name attribute
mixed$elementLabelLabel(s) for the input field
mixed$attributesEither a typical HTML attribute string or an associative array
Returns:
void

Definition at line 65 of file grading.php.

Here is the call graph for this function:

onQuickFormEvent ( event,
arg,
&$  caller 
)

Called by HTML_QuickForm whenever form event is made on this element. Adds necessary rules to the element and checks that coorenct instance of gradingform_instance is passed in attributes

Parameters:
string$eventName of event
mixed$argevent arguments
object$callercalling object
Returns:
void
Exceptions:
moodle_exception

Reimplemented from HTML_QuickForm_input.

Definition at line 135 of file grading.php.

Here is the call graph for this function:

setHelpButton ( helpbuttonargs,
function = 'helpbutton' 
)

set html for help button

public

Parameters:
array$helparray of arguments to make a help button
string$functionfunction name to call to get html

Definition at line 100 of file grading.php.

Here is the call graph for this function:

toHtml ( )

Returns the input field in HTML

Returns:
string

Reimplemented from HTML_QuickForm_input.

Definition at line 88 of file grading.php.

Here is the call graph for this function:


Field Documentation

$_helpbutton = ''

Definition at line 49 of file grading.php.


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