/** * Set how the feedback is shown to the candidate. * * * TestFeedbackAccess::DURING = At outcome processing time. * * TestFeedbackAccess:AT_END = At the end of the TestPart or AssessmentTest. * * @param int $access A value of the TestFeedbackAccess enumeration. * @throws \InvalidArgumentException If $access is not a value from the TestFeedbackAccess enumeration. */ public function setAccess($access) { if (in_array($access, TestFeedbackAccess::asArray())) { $this->access = $access; } else { $msg = "'{$access}' is not a value from the TestFeedbackAccess enumeration."; throw new InvalidArgumentException($msg); } }