Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
workshop_assessment Class Reference

Represents a rendarable full assessment. More...

Inheritance diagram for workshop_assessment:
workshop_assessment_base renderable workshop_example_assessment workshop_example_reference_assessment

Public Member Functions

 add_action (moodle_url $url, $label, $method='get')
 Adds a new action.
 
 get_overall_feedback_attachments ()
 Prepares the list of overall feedback attachments.
 
 get_overall_feedback_content ()
 Format the overall feedback text content.
 

Public Attributes

array $actions = array()
 of actions
 
stdClass null $author = null
 assessed submission's author user info
 
string $feedbackauthor
 
int $feedbackauthorattachment
 
int $feedbackauthorformat
 
workshop_assessment_form $form
 $form as returned by workshop_strategy::get_assessment_form()
 
float $grade
 
float $gradinggrade
 
float $gradinggradeover
 
int $id
 
float $maxgrade
 the real maximum grade
 
float null $realgrade = null
 the real received grade
 
stdClass null $reviewer = null
 reviewer user info
 
int $submissionid
 
int $timecreated
 
int $timemodified
 
string $title = ''
 the optional title of the assessment
 
moodle_url $url
 
int $weight
 
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
 

Detailed Description

Represents a rendarable full assessment.

Member Function Documentation

◆ add_action()

workshop_assessment_base::add_action ( moodle_url $url,
$label,
$method = 'get' )
inherited

Adds a new action.

Parameters
moodle_url$urlaction URL
string$labelaction label
string$methodget|post

◆ get_overall_feedback_attachments()

workshop_assessment::get_overall_feedback_attachments ( )

Prepares the list of overall feedback attachments.

Returns false if overall feedback attachments are not allowed. Otherwise returns list of attachments (may be empty).

Return values
bool|arrayof stdClass

◆ get_overall_feedback_content()

workshop_assessment::get_overall_feedback_content ( )

Format the overall feedback text content.

False is returned if the overall feedback feature is disabled. Null is returned if the overall feedback content has not been found. Otherwise, string with formatted feedback text is returned.

Return values
string|bool|null

◆ validate_raw_record()

workshop_assessment_base::validate_raw_record ( stdClass $record)
protectedinherited

Makes sure that we can cook the renderable component from the passed raw database record.

Parameters
stdClass$assessmentfull assessment record
Exceptions
coding_exceptionif the caller passed unexpected data

Reimplemented in workshop_example_assessment, and workshop_example_reference_assessment.

Member Data Documentation

◆ $fields

array workshop_assessment::$fields
protected
Initial value:
= array('id', 'submissionid', 'weight', 'timecreated',
'timemodified', 'grade', 'gradinggrade', 'gradinggradeover', 'feedbackauthor',
'feedbackauthorformat', 'feedbackauthorattachment')

The documentation for this class was generated from the following file: