protected static function export_user_data_in_category_contexts($userid, array $contexts) {
        $contexts = array_filter($contexts, function($context) {
            return $context->contextlevel == CONTEXT_COURSECAT;
        });
        if (empty($contexts)) {
            return;
        }

        foreach ($contexts as $context) {
            static::export_user_data_frameworks_in_context($userid, $context);
            static::export_user_data_templates_in_context($userid, $context);
        }
    }
protected static function export_user_data_in_category_contexts($userid, array $contexts) {
        $contexts = array_filter($contexts, function($context) {
            return $context->contextlevel == CONTEXT_COURSECAT;
        });
        if (empty($contexts)) {
            return;
        }

        foreach ($contexts as $context) {
            static::export_user_data_frameworks_in_context($userid, $context);
            static::export_user_data_templates_in_context($userid, $context);
        }
    }
protected static function export_user_data_in_category_contexts ( $ userid , array $ contexts ) { $ contexts = array_filter ( $ contexts , function ( $ context ) { return $ context -> contextlevel == CONTEXT_COURSECAT ; } ) ; if ( empty ( $ contexts ) ) { return ; } foreach ( $ contexts as $ context ) { static :: export_user_data_frameworks_in_context ( $ userid , $ context ) ; static :: export_user_data_templates_in_context ( $ userid , $ context ) ; } }
Export the user data in category contexts.

@param int $userid The user ID.
@param array $contexts The contexts.
@return void
Export the user data in category contexts .