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


Public Member Functions | |
| MoodleQuickForm_rubriceditor ($elementName=null, $elementLabel=null, $attributes=null) | |
| setHelpButton ($helpbuttonargs, $function='helpbutton') | |
| getHelpButton () | |
| getElementTemplateType () | |
| add_regrade_confirmation ($changelevel) | |
| toHtml () | |
| non_js_button_pressed ($value) | |
| validate ($value) | |
| exportValue (&$submitValues, $assoc=false) | |
Data Fields | |
| $_helpbutton = '' | |
Protected Member Functions | |
| prepare_data ($value=null, $withvalidation=false) | |
| get_next_id ($ids) | |
Protected Attributes | |
| $validationerrors = null | |
| $wasvalidated = false | |
| $nonjsbuttonpressed = false | |
| $regradeconfirmation = false | |
Definition at line 29 of file rubriceditor.php.
| add_regrade_confirmation | ( | $ | changelevel | ) |
Specifies that confirmation about re-grading needs to be added to this rubric editor. $changelevel is saved in $this->regradeconfirmation and retrieved in toHtml()
| int | $changelevel |
Definition at line 82 of file rubriceditor.php.
| exportValue | ( | &$ | submitValues, |
| $ | assoc = false |
||
| ) |
Prepares the data for saving
| array | $submitValues | |
| boolean | $assoc |
Reimplemented from HTML_QuickForm_input.
Definition at line 359 of file rubriceditor.php.

| get_next_id | ( | $ | ids | ) | [protected] |
Scans array $ids to find the biggest element ! NEWID*, increments it by 1 and returns
| array | $ids |
Definition at line 310 of file rubriceditor.php.

The renderer will take care itself about different display in normal and frozen states
Definition at line 71 of file rubriceditor.php.
| getHelpButton | ( | ) |
get html for help button
public
Definition at line 62 of file rubriceditor.php.
| MoodleQuickForm_rubriceditor | ( | $ | elementName = null, |
| $ | elementLabel = null, |
||
| $ | attributes = null |
||
| ) |
| non_js_button_pressed | ( | $ | value | ) |
Checks if a submit button was pressed which is supposed to be processed on client side by JS but user seem to have disabled JS in the browser. (buttons 'add criteria', 'add level', 'move up', 'move down', etc.) In this case the form containing this element is prevented from being submitted
| array | $value |
Definition at line 329 of file rubriceditor.php.

| prepare_data | ( | $ | value = null, |
| $ | withvalidation = false |
||
| ) | [protected] |
Prepares the data passed in $_POST:
| array | $value | |
| boolean | $withvalidation | whether to enable data validation |
Definition at line 142 of file rubriceditor.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 52 of file rubriceditor.php.

| toHtml | ( | ) |
Returns html string to display this element
Reimplemented from HTML_QuickForm_input.
Definition at line 91 of file rubriceditor.php.

| validate | ( | $ | value | ) |
Validates that rubric has at least one criterion, at least two levels within one criterion, each level has a valid score, all levels have filled definitions and all criteria have filled descriptions
| array | $value |
Definition at line 344 of file rubriceditor.php.

| $_helpbutton = '' |
help message
Definition at line 31 of file rubriceditor.php.
$nonjsbuttonpressed = false [protected] |
If non-submit (JS) button was pressed: null - unknown, true/false - button was/wasn't pressed
Definition at line 37 of file rubriceditor.php.
$regradeconfirmation = false [protected] |
Message to display in front of the editor (that there exist grades on this rubric being edited)
Definition at line 39 of file rubriceditor.php.
$validationerrors = null [protected] |
stores the result of the last validation: null - undefined, false - no errors, string - error(s) text
Definition at line 33 of file rubriceditor.php.
$wasvalidated = false [protected] |
if element has already been validated
Definition at line 35 of file rubriceditor.php.