original_string: protected function add_feedback_files(int $historyid = null) {
          global $CFG;
  
          // We only support feedback files for modules atm.
          if ($this->grade_item && $this->grade_item->is_external_item()) {
              $context = $this->get_context();
              $this->copy_feedback_files($context, GRADE_FEEDBACK_FILEAREA, $this->id);
  
              if (empty($CFG->disablegradehistory) && $historyid) {
                  $this->copy_feedback_files($context, GRADE_HISTORY_FEEDBACK_FILEAREA, $historyid);
              }
          }
  
          return $this->id;
      }
code: protected function add_feedback_files(int $historyid = null) {
          global $CFG;
  
          // We only support feedback files for modules atm.
          if ($this->grade_item && $this->grade_item->is_external_item()) {
              $context = $this->get_context();
              $this->copy_feedback_files($context, GRADE_FEEDBACK_FILEAREA, $this->id);
  
              if (empty($CFG->disablegradehistory) && $historyid) {
                  $this->copy_feedback_files($context, GRADE_HISTORY_FEEDBACK_FILEAREA, $historyid);
              }
          }
  
          return $this->id;
      }
code_tokens: protected function add_feedback_files ( int $ historyid = null ) { global $ CFG ; // We only support feedback files for modules atm. if ( $ this -> grade_item && $ this -> grade_item -> is_external_item ( ) ) { $ context = $ this -> get_context ( ) ; $ this -> copy_feedback_files ( $ context , GRADE_FEEDBACK_FILEAREA , $ this -> id ) ; if ( empty ( $ CFG -> disablegradehistory ) && $ historyid ) { $ this -> copy_feedback_files ( $ context , GRADE_HISTORY_FEEDBACK_FILEAREA , $ historyid ) ; } } return $ this -> id ; }
docstring: Handles adding feedback files in the gradebook.
  
  @param int|null $historyid
docstring_tokens: Handles adding feedback files in the gradebook .