public function check_examples_assessed_before_assessment($userid) {

        if ($this->useexamples and $this->examplesmode == self::EXAMPLES_BEFORE_ASSESSMENT
                and !has_capability('mod/workshop:manageexamples', $this->context)) {

            // The reviewer must have submitted their own submission.
            $reviewersubmission = $this->get_submission_by_author($userid);
            if (!$reviewersubmission) {
                // No money, no love.
                return array(false, 'exampleneedsubmission');
            } else {
                $examples = $this->get_examples_for_reviewer($userid);
                foreach ($examples as $exampleid => $example) {
                    if (is_null($example->grade)) {
                        return array(false, 'exampleneedassessed');
                    }
                }
            }
        }
        return array(true, null);
    }