The editor for the marking guide advanced grading plugin.
More...
|
| __construct ($elementname=null, $elementlabel=null, $attributes=null) |
| Constructor.
|
|
| 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_guideeditor ($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 guide has at least one criterion, filled definitions and all criteria have filled descriptions.
|
|
|
string | $_helpbutton = '' |
| help message
|
|
|
| get_next_id ($ids) |
| Scans array $ids to find the biggest element ! NEWID*, increments it by 1 and returns.
|
|
| prepare_data ($value=null, $withvalidation=false) |
| Prepares the data passed in $_POST:
|
|
|
null bool | $nonjsbuttonpressed = false |
| If non-submit (JS) button was pressed: null - unknown, true/false - button was/wasn't pressed.
|
|
string false | $regradeconfirmation = false |
| Message to display in front of the editor (that there exist grades on this guide being edited)
|
|
null false string | $validationerrors = null |
| stores the result of the last validation: null - undefined, false - no errors, string - error(s) text
|
|
bool | $wasvalidated = false |
| if element has already been validated
|
|
The editor for the marking guide advanced grading plugin.
- Copyright
- 2012 Dan Marsden dan@d.nosp@m.anma.nosp@m.rsden.nosp@m..com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
moodlequickform_guideeditor::__construct |
( |
| $elementname = null, |
|
|
| $elementlabel = null, |
|
|
| $attributes = null ) |
Constructor.
- Parameters
-
string | $elementname | |
string | $elementlabel | |
array | $attributes | |
◆ add_regrade_confirmation()
moodlequickform_guideeditor::add_regrade_confirmation |
( |
| $changelevel | ) |
|
◆ exportValue()
moodlequickform_guideeditor::exportValue |
( |
& | $submitvalues, |
|
|
| $assoc = false ) |
Prepares the data for saving.
- See also
- prepare_data()
- Parameters
-
array | $submitvalues | |
boolean | $assoc | |
- Return values
-
◆ get_next_id()
moodlequickform_guideeditor::get_next_id |
( |
| $ids | ) |
|
|
protected |
Scans array $ids to find the biggest element ! NEWID*, increments it by 1 and returns.
- Parameters
-
- Return values
-
◆ getElementTemplateType()
moodlequickform_guideeditor::getElementTemplateType |
( |
| ) |
|
The renderer will take care itself about different display in normal and frozen states.
- Return values
-
◆ getHelpButton()
moodlequickform_guideeditor::getHelpButton |
( |
| ) |
|
get html for help button
- Return values
-
string | html for help button |
◆ moodlequickform_guideeditor()
moodlequickform_guideeditor::moodlequickform_guideeditor |
( |
| $elementname = null, |
|
|
| $elementlabel = null, |
|
|
| $attributes = null ) |
◆ non_js_button_pressed()
moodlequickform_guideeditor::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', 'add comment') 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 |
◆ prepare_data()
moodlequickform_guideeditor::prepare_data |
( |
| $value = null, |
|
|
| $withvalidation = false ) |
|
protected |
Prepares the data passed in $_POST:
- processes the pressed buttons 'addlevel', 'addcriterion', 'moveup', 'movedown', 'delete' (when JavaScript is disabled) sets $this->nonjsbuttonpressed to true/false if such button was pressed
- if options not passed (i.e. we create a new guide) fills the options array with the default values
- if options are passed completes the options array with unchecked checkboxes
- if $withvalidation is set, adds 'error_xxx' attributes to elements that contain errors and creates an error string and stores it in $this->validationerrors
- Parameters
-
array | $value | |
boolean | $withvalidation | whether to enable data validation |
- Return values
-
◆ toHtml()
moodlequickform_guideeditor::toHtml |
( |
| ) |
|
Returns html string to display this element.
- Return values
-
◆ validate()
moodlequickform_guideeditor::validate |
( |
| $value | ) |
|
Validates that guide has at least one criterion, filled definitions and all criteria have filled descriptions.
- Parameters
-
- Return values
-
string|false | error text or false if no errors found |
The documentation for this class was generated from the following file:
- grade/grading/form/guide/guideeditor.php