public static function getQuizAnwsers(QuizData $qd, Quizset $quizset) { $users = $qd->getUsersWhoFinished($quizset->getId()); if (!$users && empty($users)) { throw new \InvalidArgumentException("There is no users"); } $quizAnsCollection = QuizCollection::create($qd, $users); return $quizAnsCollection->getOutcome(); }
public function setAnwsers(QuizData $qd) { $anwsers = $qd->getUserAnwsers($this->id, $this->idSet); $this->anwserCollection = new AnwserCollection($anwsers); }