original_string: public static function export_training_data($modelid, $timesplittingid) {
  
          $fs = get_file_storage();
  
          $contextid = \context_system::instance()->id;
          $filepath = '/timesplitting/' . \core_analytics\analysis::clean_time_splitting_id($timesplittingid) . '/';
  
          $files = $fs->get_directory_files($contextid, 'analytics', self::LABELLED_FILEAREA, $modelid,
              $filepath, true, false);
  
          // Discard evaluation files.
          foreach ($files as $key => $file) {
              if ($file->get_filename() === self::EVALUATION_FILENAME) {
                  unset($files[$key]);
              }
          }
  
          if (empty($files)) {
              return false;
          }
  
          return self::merge_datasets($files, $modelid, $timesplittingid, self::EXPORT_FILEAREA);
      }
code: public static function export_training_data($modelid, $timesplittingid) {
  
          $fs = get_file_storage();
  
          $contextid = \context_system::instance()->id;
          $filepath = '/timesplitting/' . \core_analytics\analysis::clean_time_splitting_id($timesplittingid) . '/';
  
          $files = $fs->get_directory_files($contextid, 'analytics', self::LABELLED_FILEAREA, $modelid,
              $filepath, true, false);
  
          // Discard evaluation files.
          foreach ($files as $key => $file) {
              if ($file->get_filename() === self::EVALUATION_FILENAME) {
                  unset($files[$key]);
              }
          }
  
          if (empty($files)) {
              return false;
          }
  
          return self::merge_datasets($files, $modelid, $timesplittingid, self::EXPORT_FILEAREA);
      }
code_tokens: public static function export_training_data ( $ modelid , $ timesplittingid ) { $ fs = get_file_storage ( ) ; $ contextid = \ context_system :: instance ( ) -> id ; $ filepath = '/timesplitting/' . \ core_analytics \ analysis :: clean_time_splitting_id ( $ timesplittingid ) . '/' ; $ files = $ fs -> get_directory_files ( $ contextid , 'analytics' , self :: LABELLED_FILEAREA , $ modelid , $ filepath , true , false ) ; // Discard evaluation files. foreach ( $ files as $ key => $ file ) { if ( $ file -> get_filename ( ) === self :: EVALUATION_FILENAME ) { unset ( $ files [ $ key ] ) ; } } if ( empty ( $ files ) ) { return false ; } return self :: merge_datasets ( $ files , $ modelid , $ timesplittingid , self :: EXPORT_FILEAREA ) ; }
docstring: Exports the model training data.
  
  @param int $modelid
  @param string $timesplittingid
  @return \stored_file|false
docstring_tokens: Exports the model training data .