Assign feedback plugins
An assignment feedback plugin can do many things including providing feedback to students about a submission. The grading interface for the assignment module provides many hooks that allow plugins to add their own entries and participate in the grading workflow.
For a good reference implementation, see the file feedback plugin included with core because it uses most of the features of feedback plugins.
File structure
Assignment Feedback plugins are located in the /mod/assign/feedback
directory. A plugin should not include any custom files outside of it's own plugin folder.
The plugin name should be no longer than 38 (13 before Moodle 4.3) characters - this is because the database tables for a submission plugin must be prefixed with assignfeedback_[pluginname]
(15 chars + X) and the table names can be no longer than 53 (28 before Moodle 4.3) chars due to a limitation with PostgreSQL.
If a plugin requires multiple database tables, the plugin name will need to be shorter to allow different table names to fit under the 53 character limit (28 before Moodle 4.3).
Note: If your plugin is intended to work with versions of Moodle older than 4.3, then the plugin name must be 13 characters or shorter, and table names must be 28 characters or shorter.
Each plugin is in a separate subdirectory and consists of a number of mandatory files and any other files the developer is going to use.
Some of the important files are described below. See the common plugin files documentation for details of other files which may be useful in your plugin.
View an example directory layout for the assignfeedback_file
plugin.
mod/assign/feedback/file
├── backup
│ └── moodle2
│ ├── backup_assignfeedback_file_subplugin.class.php
│ └── restore_assignfeedback_file_subplugin.class.php
├── classes