Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 402] [Versions 39 and 403]

This file defines a base class for all assessment forms

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

Defines 1 class

workshop_assessment_form:: (4 methods):
  definition()
  definition_inner()
  is_editable()
  get_customdata()


Class: workshop_assessment_form  - X-Ref

Base class for all assessment forms

This defines the common fields that all assessment 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().
Strategy subclassess should define their own fields in definition_inner()

return: void

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

param: stdClass $mform the form being built.

is_editable()   X-Ref
Is the form frozen (read-only)?

return: boolean

get_customdata()   X-Ref
Return the form custom data.

return: array an array containing the custom data