public function validateAdaptiveAssessmentSection(SectionPartCollection $sectionsParts, $ref, $testAdminId)
    {
        $engine = $this->getEngine($ref);
        $adaptSection = $engine->setupSection($testAdminId);
        //todo: remove this checking if tests/{getSectionId}/items will become a part of standard.
        if (method_exists($adaptSection, 'getItemReferences')) {
            $itemReferences = $adaptSection->getItemReferences();
            $dependencies = $sectionsParts->getKeys();

            if ($catDiff = array_diff($dependencies, $itemReferences)) {
                throw new AdaptiveSectionInjectionException('Missed some CAT service items: '. implode(', ', $catDiff), $catDiff);
            }

            if ($packageDiff = array_diff($dependencies, $itemReferences)) {
                throw new AdaptiveSectionInjectionException('Missed some package items: '. implode(', ', $packageDiff), $packageDiff);
            }
        }
    }
public function validateAdaptiveAssessmentSection(SectionPartCollection $sectionsParts, $ref, $testAdminId)
    {
        $engine = $this->getEngine($ref);
        $adaptSection = $engine->setupSection($testAdminId);
        //todo: remove this checking if tests/{getSectionId}/items will become a part of standard.
        if (method_exists($adaptSection, 'getItemReferences')) {
            $itemReferences = $adaptSection->getItemReferences();
            $dependencies = $sectionsParts->getKeys();

            if ($catDiff = array_diff($dependencies, $itemReferences)) {
                throw new AdaptiveSectionInjectionException('Missed some CAT service items: '. implode(', ', $catDiff), $catDiff);
            }

            if ($packageDiff = array_diff($dependencies, $itemReferences)) {
                throw new AdaptiveSectionInjectionException('Missed some package items: '. implode(', ', $packageDiff), $packageDiff);
            }
        }
    }
public function validateAdaptiveAssessmentSection ( SectionPartCollection $ sectionsParts , $ ref , $ testAdminId ) { $ engine = $ this -> getEngine ( $ ref ) ; $ adaptSection = $ engine -> setupSection ( $ testAdminId ) ; //todo: remove this checking if tests/{getSectionId}/items will become a part of standard. if ( method_exists ( $ adaptSection , 'getItemReferences' ) ) { $ itemReferences = $ adaptSection -> getItemReferences ( ) ; $ dependencies = $ sectionsParts -> getKeys ( ) ; if ( $ catDiff = array_diff ( $ dependencies , $ itemReferences ) ) { throw new AdaptiveSectionInjectionException ( 'Missed some CAT service items: ' . implode ( ', ' , $ catDiff ) , $ catDiff ) ; } if ( $ packageDiff = array_diff ( $ dependencies , $ itemReferences ) ) { throw new AdaptiveSectionInjectionException ( 'Missed some package items: ' . implode ( ', ' , $ packageDiff ) , $ packageDiff ) ; } } }
Validation for adaptive section
@param SectionPartCollection $sectionsParts
@param string $ref
@param string $testAdminId
@throws AdaptiveSectionInjectionException
Validation for adaptive section