protected function feedback_viewed(\cm_info $cm, $contextid, $userid, $after = null) {
        // If stats are published any write action counts as viewed feedback.
        if (!empty($this->instancedata[$cm->instance]->publish_stats)) {
            $user = (object)['id' => $userid];
            return $this->any_write_log($contextid, $user);
        }

        return parent::feedback_viewed($cm, $contextid, $userid, $after);
    }
protected function feedback_viewed(\cm_info $cm, $contextid, $userid, $after = null) {
        // If stats are published any write action counts as viewed feedback.
        if (!empty($this->instancedata[$cm->instance]->publish_stats)) {
            $user = (object)['id' => $userid];
            return $this->any_write_log($contextid, $user);
        }

        return parent::feedback_viewed($cm, $contextid, $userid, $after);
    }
protected function feedback_viewed ( \ cm_info $ cm , $ contextid , $ userid , $ after = null ) { // If stats are published any write action counts as viewed feedback. if ( ! empty ( $ this -> instancedata [ $ cm -> instance ] -> publish_stats ) ) { $ user = ( object ) [ 'id' => $ userid ] ; return $ this -> any_write_log ( $ contextid , $ user ) ; } return parent :: feedback_viewed ( $ cm , $ contextid , $ userid , $ after ) ; }
Overwritten to mark as viewed if stats are published.

@param \cm_info $cm
@param int $contextid
@param int $userid
@param int $after
@return bool
Overwritten to mark as viewed if stats are published .