. /** * This file contains the function for feedback_plugin abstract class * * * @package mod_assign * @copyright 2012 NetSpot {@link http://www.netspot.com.au} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** Include assignmentplugin.php */ require_once($CFG->dirroot.'/mod/assign/assignmentplugin.php'); /** * Abstract class for feedback_plugin inherited from assign_plugin abstract class. * * @package mod_assign * @copyright 2012 NetSpot {@link http://www.netspot.com.au} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ abstract class assign_feedback_plugin extends assign_plugin { /** * return subtype name of the plugin * * @return string */ public function get_subtype() { return 'assignfeedback'; } /** * 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. * * @param stdClass $grade The grade * @return int */ public function format_for_gradebook(stdClass $grade) { return FORMAT_MOODLE; } /** * 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. * * @param stdClass $grade The grade * @return string */ public function text_for_gradebook(stdClass $grade) { return ''; } }