public static function get_time_splitting_methods_for_evaluation(bool $all = false) {

        if ($all === false) {
            if ($enabledtimesplittings = get_config('analytics', 'defaulttimesplittingsevaluation')) {
                $enabledtimesplittings = array_flip(explode(',', $enabledtimesplittings));
            }
        }

        $timesplittings = self::get_all_time_splittings();
        foreach ($timesplittings as $key => $timesplitting) {

            if (!$timesplitting->valid_for_evaluation()) {
                unset($timesplittings[$key]);
            }

            if ($all === false) {
                // We remove the ones that are not enabled. This also respects the default value (all methods enabled).
                if (!empty($enabledtimesplittings) && !isset($enabledtimesplittings[$key])) {
                    unset($timesplittings[$key]);
                }
            }
        }
        return $timesplittings;
    }