public function set_submission_viewed($submission) {
        $params = array(
            'objectid' => $submission->id,
            'context' => $this->context,
            'courseid' => $this->course->id,
            'relateduserid' => $submission->authorid,
            'other' => array(
                'workshopid' => $this->id
            )
        );

        $event = \mod_workshop\event\submission_viewed::create($params);
        $event->trigger();
    }
public function set_submission_viewed($submission) {
        $params = array(
            'objectid' => $submission->id,
            'context' => $this->context,
            'courseid' => $this->course->id,
            'relateduserid' => $submission->authorid,
            'other' => array(
                'workshopid' => $this->id
            )
        );

        $event = \mod_workshop\event\submission_viewed::create($params);
        $event->trigger();
    }
public function set_submission_viewed ( $ submission ) { $ params = array ( 'objectid' => $ submission -> id , 'context' => $ this -> context , 'courseid' => $ this -> course -> id , 'relateduserid' => $ submission -> authorid , 'other' => array ( 'workshopid' => $ this -> id ) ) ; $ event = \ mod_workshop \ event \ submission_viewed :: create ( $ params ) ; $ event -> trigger ( ) ; }
Trigger submission viewed event.

@param stdClass $submission submission object
@since  Moodle 3.4
Trigger submission viewed event .