Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403]

This file defines a base class for all grading strategy editing forms.

Copyright: 2009 David Mudrak <david.mudrak@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 122 lines (4 kb)
Included or required: 4 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

workshop_edit_strategy_form:: (4 methods):
  definition()
  validation()
  definition_inner()
  validation_inner()


Class: workshop_edit_strategy_form  - X-Ref

Base class for editing all the strategy grading forms.

This defines the common fields that all strategy grading forms need.
Strategies should define their own  class that inherits from this one, and
implements the definition_inner() method.

definition()   X-Ref
Add the fields that are common for all grading strategies.

If the strategy does not support all these fields, then you can override
this method and remove the ones you don't want with
$mform->removeElement().
Stretegy subclassess should define their own fields in definition_inner()

return: void

validation($data, $files)   X-Ref
Validate the submitted form data.

Grading strategy plugins can provide their own validation rules by
overriding the {@link self::validation_inner()} method.

param: array $data
param: array $files
return: array

definition_inner(&$mform)   X-Ref
Add any strategy specific form fields.

param: stdClass $mform the form being built.

validation_inner($data, $files)   X-Ref
Add strategy specific validation rules.

param: array $data
param: array $files
return: array