plugin/scorm/Listener/ScormListener.php
private function copySco(Sco $sco, Scorm $resource, Sco $scoParent = null)
    {
        $scoCopy = new Sco();
        $scoCopy->setScorm($resource);
        $scoCopy->setScoParent($scoParent);

        $scoCopy->setEntryUrl($sco->getEntryUrl());
        $scoCopy->setIdentifier($sco->getIdentifier());
        $scoCopy->setTitle($sco->getTitle());
        $scoCopy->setVisible($sco->isVisible());
        $scoCopy->setParameters($sco->getParameters());
        $scoCopy->setLaunchData($sco->getLaunchData());
        $scoCopy->setMaxTimeAllowed($sco->getMaxTimeAllowed());
        $scoCopy->setTimeLimitAction($sco->getTimeLimitAction());
        $scoCopy->setBlock($sco->isBlock());
        $scoCopy->setScoreToPassInt($sco->getScoreToPassInt());
        $scoCopy->setScoreToPassDecimal($sco->getScoreToPassDecimal());
        $scoCopy->setCompletionThreshold($sco->getCompletionThreshold());
        $scoCopy->setPrerequisites($sco->getPrerequisites());
        $this->om->persist($scoCopy);

        foreach ($sco->getScoChildren() as $scoChild) {
            $this->copySco($scoChild, $resource, $scoCopy);
        }
    }
private function copySco(Sco $sco, Scorm $resource, Sco $scoParent = null)
    {
        $scoCopy = new Sco();
        $scoCopy->setScorm($resource);
        $scoCopy->setScoParent($scoParent);

        $scoCopy->setEntryUrl($sco->getEntryUrl());
        $scoCopy->setIdentifier($sco->getIdentifier());
        $scoCopy->setTitle($sco->getTitle());
        $scoCopy->setVisible($sco->isVisible());
        $scoCopy->setParameters($sco->getParameters());
        $scoCopy->setLaunchData($sco->getLaunchData());
        $scoCopy->setMaxTimeAllowed($sco->getMaxTimeAllowed());
        $scoCopy->setTimeLimitAction($sco->getTimeLimitAction());
        $scoCopy->setBlock($sco->isBlock());
        $scoCopy->setScoreToPassInt($sco->getScoreToPassInt());
        $scoCopy->setScoreToPassDecimal($sco->getScoreToPassDecimal());
        $scoCopy->setCompletionThreshold($sco->getCompletionThreshold());
        $scoCopy->setPrerequisites($sco->getPrerequisites());
        $this->om->persist($scoCopy);

        foreach ($sco->getScoChildren() as $scoChild) {
            $this->copySco($scoChild, $resource, $scoCopy);
        }
    }
private function copySco ( Sco $ sco , Scorm $ resource , Sco $ scoParent = null ) { $ scoCopy = new Sco ( ) ; $ scoCopy -> setScorm ( $ resource ) ; $ scoCopy -> setScoParent ( $ scoParent ) ; $ scoCopy -> setEntryUrl ( $ sco -> getEntryUrl ( ) ) ; $ scoCopy -> setIdentifier ( $ sco -> getIdentifier ( ) ) ; $ scoCopy -> setTitle ( $ sco -> getTitle ( ) ) ; $ scoCopy -> setVisible ( $ sco -> isVisible ( ) ) ; $ scoCopy -> setParameters ( $ sco -> getParameters ( ) ) ; $ scoCopy -> setLaunchData ( $ sco -> getLaunchData ( ) ) ; $ scoCopy -> setMaxTimeAllowed ( $ sco -> getMaxTimeAllowed ( ) ) ; $ scoCopy -> setTimeLimitAction ( $ sco -> getTimeLimitAction ( ) ) ; $ scoCopy -> setBlock ( $ sco -> isBlock ( ) ) ; $ scoCopy -> setScoreToPassInt ( $ sco -> getScoreToPassInt ( ) ) ; $ scoCopy -> setScoreToPassDecimal ( $ sco -> getScoreToPassDecimal ( ) ) ; $ scoCopy -> setCompletionThreshold ( $ sco -> getCompletionThreshold ( ) ) ; $ scoCopy -> setPrerequisites ( $ sco -> getPrerequisites ( ) ) ; $ this -> om -> persist ( $ scoCopy ) ; foreach ( $ sco -> getScoChildren ( ) as $ scoChild ) { $ this -> copySco ( $ scoChild , $ resource , $ scoCopy ) ; } }
Copy given sco and its children.

@param Sco   $sco
@param Scorm $resource
@param Sco   $scoParent
Copy given sco and its children .