|
| __construct ($elementName=null, $elementLabel=null, $attributes=null) |
| Constructor for rubric editor.
|
|
| add_regrade_confirmation ($changelevel) |
| Specifies that confirmation about re-grading needs to be added to this rubric editor.
|
|
| exportValue (&$submitValues, $assoc=false) |
| Prepares the data for saving.
|
|
| getElementTemplateType () |
| The renderer will take care itself about different display in normal and frozen states.
|
|
| getHelpButton () |
| get html for help button
|
|
| MoodleQuickForm_rubriceditor ($elementName=null, $elementLabel=null, $attributes=null) |
| Old syntax of class constructor.
|
|
| 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.
|
|
| toHtml () |
| Returns html string to display this element.
|
|
| 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.
|
|
Form element for handling rubric editor.
The rubric editor is defined as a separate form element. This allows us to render criteria, levels and buttons using the rubric's own renderer. Also, the required Javascript library is included, which processes, on the client, buttons needed for reordering, adding and deleting criteria.
If Javascript is disabled when one of those special buttons is pressed, the form element is not validated and, instead of submitting the form, we process button presses.
- Copyright
- 2011 Marina Glancy
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
MoodleQuickForm_rubriceditor::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
- Parameters
-
- Return values
-
boolean | true if non-submit button was pressed and not processed by JS |