Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

This file contains the function for feedback_plugin abstract class

Copyright: 2012 NetSpot {@link http://www.netspot.com.au}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 211 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: assign_feedback_plugin  - X-Ref

Abstract class for feedback_plugin inherited from assign_plugin abstract class.

get_subtype()   X-Ref
Return subtype name of the plugin.

return: string

format_for_gradebook(stdClass $grade)   X-Ref
If this plugin adds to the gradebook comments field, it must specify the format
of the comment.

(From weblib.php)
define('FORMAT_MOODLE',   '0');   // Does all sorts of transformations and filtering
define('FORMAT_HTML',     '1');   // Plain HTML (with some tags stripped)
define('FORMAT_PLAIN',    '2');   // Plain text (even tags are printed in full)
define('FORMAT_WIKI',     '3');   // Wiki-formatted text
define('FORMAT_MARKDOWN', '4');   // Markdown-formatted

Only one feedback plugin can push comments to the gradebook and that is chosen by the assignment
settings page.

return: int
param: stdClass $grade The grade

text_for_gradebook(stdClass $grade)   X-Ref
If this plugin adds to the gradebook comments field, it must format the text
of the comment.

Only one feedback plugin can push comments to the gradebook and that is chosen by the assignment
settings page.

return: string
param: stdClass $grade The grade

files_for_gradebook(stdClass $grade)   X-Ref
Return any files this plugin wishes to save to the gradebook.

The array being returned should contain the necessary information to
identify and copy the files.

eg.

[
'contextid' => $modulecontext->id,
'component' => ASSIGNFEEDBACK_XYZ_COMPONENT,
'filearea' => ASSIGNFEEDBACK_XYZ_FILEAREA,
'itemid' => $grade->id
]

return: array
param: stdClass $grade The assign_grades object from the db

supports_quickgrading()   X-Ref
Override to indicate a plugin supports quickgrading.

return: boolean - True if the plugin supports quickgrading

get_quickgrading_html($userid, $grade)   X-Ref
Get quickgrading form elements as html.

return: mixed - A html string containing the html form elements required for
param: int $userid The user id in the table this quickgrading element relates to
param: mixed $grade grade or null - The grade data.

is_quickgrading_modified($userid, $grade)   X-Ref
Has the plugin quickgrading form element been modified in the current form submission?

return: boolean - true if the quickgrading form element has been modified
param: int $userid The user id in the table this quickgrading element relates to
param: stdClass $grade The grade

is_feedback_modified(stdClass $grade, stdClass $data)   X-Ref
Has the plugin form element been modified in the current submission?

return: boolean - True if the form element has been modified.
param: stdClass $grade The grade.
param: stdClass $data Form data from the feedback form.

save_quickgrading_changes($userid, $grade)   X-Ref
Save quickgrading changes.

return: boolean - true if the grade changes were saved correctly
param: int $userid The user id in the table this quickgrading element relates to
param: stdClass $grade The grade

get_grading_batch_operations()   X-Ref
Return a list of the batch grading operations supported by this plugin.

return: array - An array of action and description strings.

get_grading_actions()   X-Ref
Return a list of the grading actions supported by this plugin.

A grading action is a page that is not specific to a user but to the whole assignment.
return: array - An array of action and description strings.

grading_action($gradingaction)   X-Ref
Show a grading action form

return: string The page containing the form
param: string $gradingaction The action chosen from the grading actions menu

supports_review_panel()   X-Ref
Supports injecting content into the review panel of the grading app.

return: bool True if this plugin will add content to the review panel of the grading app.

grading_batch_operation($action, $users)   X-Ref
Show a batch operations form

return: string The page containing the form
param: string $action The action chosen from the batch operations menu
param: array $users The list of selected userids