original_string: public function get_form_elements($submission, MoodleQuickForm $mform, stdClass $data) {
          global $OUTPUT;
  
          if ($this->get_config('maxfilesubmissions') <= 0) {
              return false;
          }
  
          $fileoptions = $this->get_file_options();
          $submissionid = $submission ? $submission->id : 0;
  
          $data = file_prepare_standard_filemanager($data,
                                                    'files',
                                                    $fileoptions,
                                                    $this->assignment->get_context(),
                                                    'assignsubmission_file',
                                                    ASSIGNSUBMISSION_FILE_FILEAREA,
                                                    $submissionid);
          $mform->addElement('filemanager', 'files_filemanager', $this->get_name(), null, $fileoptions);
  
          return true;
      }
code: public function get_form_elements($submission, MoodleQuickForm $mform, stdClass $data) {
          global $OUTPUT;
  
          if ($this->get_config('maxfilesubmissions') <= 0) {
              return false;
          }
  
          $fileoptions = $this->get_file_options();
          $submissionid = $submission ? $submission->id : 0;
  
          $data = file_prepare_standard_filemanager($data,
                                                    'files',
                                                    $fileoptions,
                                                    $this->assignment->get_context(),
                                                    'assignsubmission_file',
                                                    ASSIGNSUBMISSION_FILE_FILEAREA,
                                                    $submissionid);
          $mform->addElement('filemanager', 'files_filemanager', $this->get_name(), null, $fileoptions);
  
          return true;
      }
code_tokens: public function get_form_elements ( $ submission , MoodleQuickForm $ mform , stdClass $ data ) { global $ OUTPUT ; if ( $ this -> get_config ( 'maxfilesubmissions' ) <= 0 ) { return false ; } $ fileoptions = $ this -> get_file_options ( ) ; $ submissionid = $ submission ? $ submission -> id : 0 ; $ data = file_prepare_standard_filemanager ( $ data , 'files' , $ fileoptions , $ this -> assignment -> get_context ( ) , 'assignsubmission_file' , ASSIGNSUBMISSION_FILE_FILEAREA , $ submissionid ) ; $ mform -> addElement ( 'filemanager' , 'files_filemanager' , $ this -> get_name ( ) , null , $ fileoptions ) ; return true ; }
docstring: Add elements to submission form
  
  @param mixed $submission stdClass|null
  @param MoodleQuickForm $mform
  @param stdClass $data
  @return bool
docstring_tokens: Add elements to submission form