private function initFilteredQuestionList(ilObjTestDynamicQuestionSetConfig $dynamicQuestionSetConfig, $taxonomyFilterSelection)
 {
     $questionList = new ilAssQuestionList($this->db, $this->lng, $this->pluginAdmin, $dynamicQuestionSetConfig->getSourceQuestionPoolId());
     if ($dynamicQuestionSetConfig->isTaxonomyFilterEnabled()) {
         require_once 'Services/Taxonomy/classes/class.ilObjTaxonomy.php';
         $questionList->setAvailableTaxonomyIds(ilObjTaxonomy::getUsageOfObject($dynamicQuestionSetConfig->getSourceQuestionPoolId()));
         foreach ($taxonomyFilterSelection as $taxId => $taxNodes) {
             $questionList->addTaxonomyFilter($taxId, $taxNodes);
         }
     } elseif ($dynamicQuestionSetConfig->getOrderingTaxonomyId()) {
         $questionList->setAvailableTaxonomyIds(array($dynamicQuestionSetConfig->getOrderingTaxonomyId()));
     }
     $questionList->load();
     return $questionList;
 }
 private function initFilteredQuestionList(ilObjTestDynamicQuestionSetConfig $dynamicQuestionSetConfig, ilTestDynamicQuestionSetFilterSelection $filterSelection)
 {
     $questionList = new ilAssQuestionList($this->db, $this->lng, $this->pluginAdmin);
     $questionList->setParentObjIdsFilter(array($dynamicQuestionSetConfig->getSourceQuestionPoolId()));
     $questionList->setAnswerStatusActiveId($filterSelection->getAnswerStatusActiveId());
     if ($dynamicQuestionSetConfig->isAnswerStatusFilterEnabled()) {
         $questionList->setAnswerStatusFilter($filterSelection->getAnswerStatusSelection());
     }
     if ($dynamicQuestionSetConfig->isTaxonomyFilterEnabled()) {
         require_once 'Services/Taxonomy/classes/class.ilObjTaxonomy.php';
         $questionList->setAvailableTaxonomyIds(ilObjTaxonomy::getUsageOfObject($dynamicQuestionSetConfig->getSourceQuestionPoolId()));
         foreach ($filterSelection->getTaxonomySelection() as $taxId => $taxNodes) {
             $questionList->addTaxonomyFilter($taxId, $taxNodes, $dynamicQuestionSetConfig->getSourceQuestionPoolId(), 'qpl');
         }
     } elseif ($dynamicQuestionSetConfig->getOrderingTaxonomyId()) {
         $questionList->setAvailableTaxonomyIds(array($dynamicQuestionSetConfig->getOrderingTaxonomyId()));
     }
     $questionList->setForcedQuestionIds($filterSelection->getForcedQuestionIds());
     $questionList->load();
     return $questionList;
 }