. /** * mod_assign statement accepted event. * * @package mod_assign * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace mod_assign\event; defined('MOODLE_INTERNAL') || die(); /** * mod_assign statement accepted event class. * * @package mod_assign * @copyright 2013 Frédéric Massart * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class statement_accepted extends \core\event\base { /** * Legacy log data. * * @var array */ protected $legacylogdata; /** * Returns description of what happened. * * @return string */ public function get_description() { return "The user {$this->userid} has accepted the statement of the submission {$this->objectid}."; } /** * Return legacy data for add_to_log(). * * @return array */ protected function get_legacy_logdata() { return $this->legacylogdata; } /** * Return localised event name. * * @return string */ public static function get_name() { return get_string('event_statement_accepted', 'mod_assign'); } /** * Get URL related to the action. * * @return \moodle_url */ public function get_url() { return new \moodle_url('/mod/assign/view.php', array('id' => $this->context->instanceid)); } /** * Init method. * * @return void */ protected function init() { $this->data['crud'] = 'r'; $this->data['level'] = self::LEVEL_PARTICIPATING; $this->data['objecttable'] = 'assign_submission'; } /** * Sets the legacy event log data. * * @param stdClass $legacylogdata legacy log data. * @return void */ public function set_legacy_logdata($legacylogdata) { $this->legacylogdata = $legacylogdata; } }