original_string: private static function get_files($assignment, $userid, $attemptnumber, $filearea, $filepath = '/') {
          $grade = $assignment->get_user_grade($userid, true, $attemptnumber);
          $itemid = $grade->id;
          $contextid = $assignment->get_context()->id;
          $component = self::COMPONENT;
          $fs = get_file_storage();
          $files = $fs->get_directory_files($contextid, $component, $filearea, $itemid, $filepath);
          return $files;
      }
code: private static function get_files($assignment, $userid, $attemptnumber, $filearea, $filepath = '/') {
          $grade = $assignment->get_user_grade($userid, true, $attemptnumber);
          $itemid = $grade->id;
          $contextid = $assignment->get_context()->id;
          $component = self::COMPONENT;
          $fs = get_file_storage();
          $files = $fs->get_directory_files($contextid, $component, $filearea, $itemid, $filepath);
          return $files;
      }
code_tokens: private static function get_files ( $ assignment , $ userid , $ attemptnumber , $ filearea , $ filepath = '/' ) { $ grade = $ assignment -> get_user_grade ( $ userid , true , $ attemptnumber ) ; $ itemid = $ grade -> id ; $ contextid = $ assignment -> get_context ( ) -> id ; $ component = self :: COMPONENT ; $ fs = get_file_storage ( ) ; $ files = $ fs -> get_directory_files ( $ contextid , $ component , $ filearea , $ itemid , $ filepath ) ; return $ files ; }
docstring: Get All files in a File area
  @param int|\assign $assignment Assignment
  @param int $userid User ID
  @param int $attemptnumber Attempt Number
  @param string $filearea File Area
  @param string $filepath File Path
  @return array
docstring_tokens: Get All files in a File area