original_string: public function process($displayname = null, $content = null) {
          require_capability('moodle/course:manageactivities', $this->context);
  
          if ($this->is_file_upload()) {
              require_capability('moodle/course:managefiles', $this->context);
              if ($content != null) {
                  throw new moodle_exception('fileuploadwithcontent', 'moodle');
              }
          } else {
              if (empty($content)) {
                  throw new moodle_exception('dnduploadwithoutcontent', 'moodle');
              }
          }
  
          require_sesskey();
  
          $this->displayname = $displayname;
  
          if ($this->is_file_upload()) {
              $this->handle_file_upload();
          } else {
              $this->handle_other_upload($content);
          }
      }
code: public function process($displayname = null, $content = null) {
          require_capability('moodle/course:manageactivities', $this->context);
  
          if ($this->is_file_upload()) {
              require_capability('moodle/course:managefiles', $this->context);
              if ($content != null) {
                  throw new moodle_exception('fileuploadwithcontent', 'moodle');
              }
          } else {
              if (empty($content)) {
                  throw new moodle_exception('dnduploadwithoutcontent', 'moodle');
              }
          }
  
          require_sesskey();
  
          $this->displayname = $displayname;
  
          if ($this->is_file_upload()) {
              $this->handle_file_upload();
          } else {
              $this->handle_other_upload($content);
          }
      }
code_tokens: public function process ( $ displayname = null , $ content = null ) { require_capability ( 'moodle/course:manageactivities' , $ this -> context ) ; if ( $ this -> is_file_upload ( ) ) { require_capability ( 'moodle/course:managefiles' , $ this -> context ) ; if ( $ content != null ) { throw new moodle_exception ( 'fileuploadwithcontent' , 'moodle' ) ; } } else { if ( empty ( $ content ) ) { throw new moodle_exception ( 'dnduploadwithoutcontent' , 'moodle' ) ; } } require_sesskey ( ) ; $ this -> displayname = $ displayname ; if ( $ this -> is_file_upload ( ) ) { $ this -> handle_file_upload ( ) ; } else { $ this -> handle_other_upload ( $ content ) ; } }
docstring: Process the upload - creating the module in the course and returning the result to the browser
  
  @param string $displayname optional the name (from the browser) to give the course module instance
  @param string $content optional the content of the upload (for non-file uploads)
docstring_tokens: Process the upload - creating the module in the course and returning the result to the browser