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


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 = '' | |
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
Definition at line 43 of file grading.php.
| 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
| mixed | $elementValue | |
| array | $attributes |
Definition at line 157 of file grading.php.
Helper function to retrieve gradingform_instance passed in element attributes
Definition at line 75 of file grading.php.

The renderer of gradingform_instance will take care itself about different display in normal and frozen states
Definition at line 120 of file grading.php.
| getHelpButton | ( | ) |
get html for help button
public
Definition at line 110 of file grading.php.
| MoodleQuickForm_grading | ( | $ | elementName = null, |
| $ | elementLabel = null, |
||
| $ | attributes = null |
||
| ) |
Class constructor
| string | $elementName | Input field name attribute |
| mixed | $elementLabel | Label(s) for the input field |
| mixed | $attributes | Either a typical HTML attribute string or an associative array |
Definition at line 65 of file grading.php.

| 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
| string | $event | Name of event |
| mixed | $arg | event arguments |
| object | $caller | calling object |
| moodle_exception |
Reimplemented from HTML_QuickForm_input.
Definition at line 135 of file grading.php.

| setHelpButton | ( | $ | helpbuttonargs, |
| $ | function = 'helpbutton' |
||
| ) |
set html for help button
public
| array | $help | array of arguments to make a help button |
| string | $function | function name to call to get html |
Definition at line 100 of file grading.php.

| toHtml | ( | ) |
Returns the input field in HTML
Reimplemented from HTML_QuickForm_input.
Definition at line 88 of file grading.php.

| $_helpbutton = '' |
Definition at line 49 of file grading.php.