private function getDelivery()
    {
        $returnValue = null;
        //passed as aprameter
        if ($this->hasRequestParameter('delivery')) {
            $returnValue = new core_kernel_classes_Resource($this->getRequestParameter('delivery'));
        } else {
            
            $launchData = LtiService::singleton()->getLtiSession()->getLaunchData();

            /** @var LtiLaunchDataService $launchDataService */
            $launchDataService = $this->getServiceLocator()->get(LtiLaunchDataService::SERVICE_ID);
            $returnValue = $launchDataService->findDeliveryFromLaunchData($launchData);
        }
        return $returnValue;
    }
private function getDelivery()
    {
        $returnValue = null;
        //passed as aprameter
        if ($this->hasRequestParameter('delivery')) {
            $returnValue = new core_kernel_classes_Resource($this->getRequestParameter('delivery'));
        } else {
            
            $launchData = LtiService::singleton()->getLtiSession()->getLaunchData();

            /** @var LtiLaunchDataService $launchDataService */
            $launchDataService = $this->getServiceLocator()->get(LtiLaunchDataService::SERVICE_ID);
            $returnValue = $launchDataService->findDeliveryFromLaunchData($launchData);
        }
        return $returnValue;
    }
private function getDelivery ( ) { $ returnValue = null ; //passed as aprameter if ( $ this -> hasRequestParameter ( 'delivery' ) ) { $ returnValue = new core_kernel_classes_Resource ( $ this -> getRequestParameter ( 'delivery' ) ) ; } else { $ launchData = LtiService :: singleton ( ) -> getLtiSession ( ) -> getLaunchData ( ) ; /** @var LtiLaunchDataService $launchDataService */ $ launchDataService = $ this -> getServiceLocator ( ) -> get ( LtiLaunchDataService :: SERVICE_ID ) ; $ returnValue = $ launchDataService -> findDeliveryFromLaunchData ( $ launchData ) ; } return $ returnValue ; }
Returns the delivery associated with the current link
either from url or from the remote_link if configured
returns null if none found

@return core_kernel_classes_Resource
@throws LtiException
@throws \common_exception_Error
Returns the delivery associated with the current link either from url or from the remote_link if configured returns null if none found