|
Moodle PHP Documentation 5.0
Moodle 5.0.1+ (Build: 20250711) (61af040cd5f)
|
Common base class for assessments rendering. More...
Public Member Functions | |
| __construct (workshop $workshop, stdClass $record, array $options=array()) | |
| Copies the properties of the given database record into properties of $this instance. | |
| add_action (moodle_url $url, $label, $method='get') | |
| Adds a new action. | |
Public Attributes | |
| array | $actions = array() |
| of actions | |
| stdClass null | $author = null |
| assessed submission's author user info | |
| workshop_assessment_form | $form |
| $form as returned by workshop_strategy::get_assessment_form() | |
| float | $maxgrade |
| the real maximum grade | |
| float null | $realgrade = null |
| the real received grade | |
| stdClass null | $reviewer = null |
| reviewer user info | |
| string | $title = '' |
| the optional title of the assessment | |
| moodle_url | $url |
| workshop | $workshop |
Protected Member Functions | |
| validate_raw_record (stdClass $record) | |
| Makes sure that we can cook the renderable component from the passed raw database record. | |
Protected Attributes | |
| array | $fields = array() |
Common base class for assessments rendering.
Subclasses of this class convert raw assessment record from workshop_assessments table (as returned by {
| workshop_assessment_base::__construct | ( | workshop | $workshop, |
| stdClass | $record, | ||
| array | $options = array() ) |
Copies the properties of the given database record into properties of $this instance.
The $options keys are: showreviewer, showauthor
| workshop | $workshop | |
| stdClass | $assessment | full record |
| array | $options | additional properties |
| workshop_assessment_base::add_action | ( | moodle_url | $url, |
| $label, | |||
| $method = 'get' ) |
Adds a new action.
| moodle_url | $url | action URL |
| string | $label | action label |
| string | $method | get|post |
|
protected |
Makes sure that we can cook the renderable component from the passed raw database record.
| stdClass | $assessment | full assessment record |
| coding_exception | if the caller passed unexpected data |
Reimplemented in workshop_example_assessment, and workshop_example_reference_assessment.