original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: Export the user data in category contexts.
  
  @param int $userid The user ID.
  @param array $contexts The contexts.
  @return void
docstring_tokens: Export the user data in category contexts .