51 if (!isset($this->collectionSubsetApplications[$applicantId])) {
55 return $this->collectionSubsetApplications[$applicantId];
68 $this->collectionSubsetApplications[$collectionSubsetApplication->
getApplicantId()] = $collectionSubsetApplication;
116 return current($this->collectionSubsetApplications);
124 return next($this->collectionSubsetApplications);
127 public function key(): string
129 return key($this->collectionSubsetApplications);
134 return key($this->collectionSubsetApplications) !== null;
141 return reset($this->collectionSubsetApplications);
149 $questionReservationRequired =
false;
151 foreach ($this as $collectionSubsetApplication) {
152 if (!$collectionSubsetApplication->hasQuestion($question->
getQuestionId())) {
156 if ($collectionSubsetApplication->hasRequiredAmountLeft()) {
157 $questionReservationRequired =
true;
158 $collectionSubsetApplication->decrementRequiredAmount();
162 if ($questionReservationRequired) {
174 foreach ($this as $collectionSubsetApplication) {
175 $applicationsNonReservedQstCollection = $collectionSubsetApplication->getRelativeComplementCollection(
179 $availableQuestionCollection->mergeQuestionCollection($applicationsNonReservedQstCollection);
182 $nonReservedQuestionCollection = $availableQuestionCollection->getUniqueQuestionCollection();
184 return $nonReservedQuestionCollection->getQuestionAmount();
setCollectionSubsetApplications($collectionSubsetApplications)
resetCollectionSubsetApplicants()
resetter for collectionSubsetApplicants
handleQuestionRequest(ilTestRandomQuestionSetQuestion $question)
$reservedQuestionCollection
__construct()
ilTestRandomQuestionCollectionSubsetApplicantList constructor.
getNonReservedQuestionAmount()
addCollectionSubsetApplication(ilTestRandomQuestionCollectionSubsetApplication $collectionSubsetApplication)
getReservedQuestionCollection()
setReservedQuestionCollection($reservedQuestionCollection)
addReservedQuestion(ilTestRandomQuestionSetQuestion $reservedQuestion)
getCollectionSubsetApplication($applicantId)
getCollectionSubsetApplications()
$collectionSubsetApplications