protected function determineTaoRoles(LtiLaunchData $ltiLaunchData)
    {
        $roles = array();
        if ($ltiLaunchData->hasVariable(LtiLaunchData::ROLES)) {
            foreach ($ltiLaunchData->getUserRoles() as $role) {
                $taoRole = LtiUtils::mapLTIRole2TaoRole($role);
                if (!is_null($taoRole)) {
                    $roles[] = $taoRole;
                }
            }
            $roles = array_unique($roles);
        } else {
            return array(LtiRoles::INSTANCE_LTI_BASE);
        }
        return $roles;
    }
protected function determineTaoRoles(LtiLaunchData $ltiLaunchData)
    {
        $roles = array();
        if ($ltiLaunchData->hasVariable(LtiLaunchData::ROLES)) {
            foreach ($ltiLaunchData->getUserRoles() as $role) {
                $taoRole = LtiUtils::mapLTIRole2TaoRole($role);
                if (!is_null($taoRole)) {
                    $roles[] = $taoRole;
                }
            }
            $roles = array_unique($roles);
        } else {
            return array(LtiRoles::INSTANCE_LTI_BASE);
        }
        return $roles;
    }
protected function determineTaoRoles ( LtiLaunchData $ ltiLaunchData ) { $ roles = array ( ) ; if ( $ ltiLaunchData -> hasVariable ( LtiLaunchData :: ROLES ) ) { foreach ( $ ltiLaunchData -> getUserRoles ( ) as $ role ) { $ taoRole = LtiUtils :: mapLTIRole2TaoRole ( $ role ) ; if ( ! is_null ( $ taoRole ) ) { $ roles [ ] = $ taoRole ; } } $ roles = array_unique ( $ roles ) ; } else { return array ( LtiRoles :: INSTANCE_LTI_BASE ) ; } return $ roles ; }
Calculate your primary tao roles from the launchdata

@param LtiLaunchData $ltiLaunchData
@return array
@throws \common_Exception
@throws \common_exception_Error
Calculate your primary tao roles from the launchdata