original_string: public function get_files(stdClass $submission, stdClass $user) {
          $result = array();
          $fs = get_file_storage();
  
          $files = $fs->get_area_files($this->assignment->get_context()->id,
                                       'assignsubmission_file',
                                       ASSIGNSUBMISSION_FILE_FILEAREA,
                                       $submission->id,
                                       'timemodified',
                                       false);
  
          foreach ($files as $file) {
              // Do we return the full folder path or just the file name?
              if (isset($submission->exportfullpath) && $submission->exportfullpath == false) {
                  $result[$file->get_filename()] = $file;
              } else {
                  $result[$file->get_filepath().$file->get_filename()] = $file;
              }
          }
          return $result;
      }
code: public function get_files(stdClass $submission, stdClass $user) {
          $result = array();
          $fs = get_file_storage();
  
          $files = $fs->get_area_files($this->assignment->get_context()->id,
                                       'assignsubmission_file',
                                       ASSIGNSUBMISSION_FILE_FILEAREA,
                                       $submission->id,
                                       'timemodified',
                                       false);
  
          foreach ($files as $file) {
              // Do we return the full folder path or just the file name?
              if (isset($submission->exportfullpath) && $submission->exportfullpath == false) {
                  $result[$file->get_filename()] = $file;
              } else {
                  $result[$file->get_filepath().$file->get_filename()] = $file;
              }
          }
          return $result;
      }
code_tokens: public function get_files ( stdClass $ submission , stdClass $ user ) { $ result = array ( ) ; $ fs = get_file_storage ( ) ; $ files = $ fs -> get_area_files ( $ this -> assignment -> get_context ( ) -> id , 'assignsubmission_file' , ASSIGNSUBMISSION_FILE_FILEAREA , $ submission -> id , 'timemodified' , false ) ; foreach ( $ files as $ file ) { // Do we return the full folder path or just the file name? if ( isset ( $ submission -> exportfullpath ) && $ submission -> exportfullpath == false ) { $ result [ $ file -> get_filename ( ) ] = $ file ; } else { $ result [ $ file -> get_filepath ( ) . $ file -> get_filename ( ) ] = $ file ; } } return $ result ; }
docstring: Produce a list of files suitable for export that represent this feedback or submission
  
  @param stdClass $submission The submission
  @param stdClass $user The user record - unused
  @return array - return an array of files indexed by filename
docstring_tokens: Produce a list of files suitable for export that represent this feedback or submission