private function hasTaxonomyFilter(ilTestRandomQuestionSetSourcePoolDefinition $definition) { if (!(int) $definition->getMappedFilterTaxId()) { return false; } if (!(int) $definition->getMappedFilterTaxNodeId()) { return false; } return true; }
/** * build title by definition * @param ilTestRandomQuestionSetSourcePoolDefinition $def */ protected static function buildQplTitleByDefinition(ilTestRandomQuestionSetSourcePoolDefinition $def, ilTestTaxonomyFilterLabelTranslater $trans) { $title = $def->getPoolTitle(); $tax_id = $def->getMappedFilterTaxId(); if ($tax_id) { $title .= ' -> ' . $trans->getTaxonomyTreeLabel($tax_id); } $tax_node = $def->getMappedFilterTaxNodeId(); if ($tax_node) { $title .= ' -> ' . $trans->getTaxonomyNodeLabel($tax_node); } return $title; }