private function getReturnBaseUrl()
    {
        $baseUrl = '';

        /** @var TaoLtiSession $session */
        $session = \common_session_SessionManager::getSession();
        if ($session instanceof TaoLtiSession) {
            $launchData = $session->getLaunchData();
            if ($launchData->hasReturnUrl()) {
                $baseUrl = $launchData->getReturnUrl();
            }
        } else {
            if ($this->launchData->hasVariable(LtiLaunchData::LAUNCH_PRESENTATION_RETURN_URL)) {
                $baseUrl = $this->launchData->getVariable(LtiLaunchData::LAUNCH_PRESENTATION_RETURN_URL);
            }
        }

        return $baseUrl;
    }