original_string: public function add_mform_elements(&$mform) {
          if (empty($this->type)) {
              return;
          }
  
          $mform->addElement('hidden', 'gpr_type', $this->type);
          $mform->setType('gpr_type', PARAM_SAFEDIR);
  
          if (!empty($this->plugin)) {
              $mform->addElement('hidden', 'gpr_plugin', $this->plugin);
              $mform->setType('gpr_plugin', PARAM_PLUGIN);
          }
  
          if (!empty($this->courseid)) {
              $mform->addElement('hidden', 'gpr_courseid', $this->courseid);
              $mform->setType('gpr_courseid', PARAM_INT);
          }
  
          if (!empty($this->userid)) {
              $mform->addElement('hidden', 'gpr_userid', $this->userid);
              $mform->setType('gpr_userid', PARAM_INT);
          }
  
          if (!empty($this->groupid)) {
              $mform->addElement('hidden', 'gpr_groupid', $this->groupid);
              $mform->setType('gpr_groupid', PARAM_INT);
          }
  
          if (!empty($this->page)) {
              $mform->addElement('hidden', 'gpr_page', $this->page);
              $mform->setType('gpr_page', PARAM_INT);
          }
      }
code: public function add_mform_elements(&$mform) {
          if (empty($this->type)) {
              return;
          }
  
          $mform->addElement('hidden', 'gpr_type', $this->type);
          $mform->setType('gpr_type', PARAM_SAFEDIR);
  
          if (!empty($this->plugin)) {
              $mform->addElement('hidden', 'gpr_plugin', $this->plugin);
              $mform->setType('gpr_plugin', PARAM_PLUGIN);
          }
  
          if (!empty($this->courseid)) {
              $mform->addElement('hidden', 'gpr_courseid', $this->courseid);
              $mform->setType('gpr_courseid', PARAM_INT);
          }
  
          if (!empty($this->userid)) {
              $mform->addElement('hidden', 'gpr_userid', $this->userid);
              $mform->setType('gpr_userid', PARAM_INT);
          }
  
          if (!empty($this->groupid)) {
              $mform->addElement('hidden', 'gpr_groupid', $this->groupid);
              $mform->setType('gpr_groupid', PARAM_INT);
          }
  
          if (!empty($this->page)) {
              $mform->addElement('hidden', 'gpr_page', $this->page);
              $mform->setType('gpr_page', PARAM_INT);
          }
      }
code_tokens: public function add_mform_elements ( & $ mform ) { if ( empty ( $ this -> type ) ) { return ; } $ mform -> addElement ( 'hidden' , 'gpr_type' , $ this -> type ) ; $ mform -> setType ( 'gpr_type' , PARAM_SAFEDIR ) ; if ( ! empty ( $ this -> plugin ) ) { $ mform -> addElement ( 'hidden' , 'gpr_plugin' , $ this -> plugin ) ; $ mform -> setType ( 'gpr_plugin' , PARAM_PLUGIN ) ; } if ( ! empty ( $ this -> courseid ) ) { $ mform -> addElement ( 'hidden' , 'gpr_courseid' , $ this -> courseid ) ; $ mform -> setType ( 'gpr_courseid' , PARAM_INT ) ; } if ( ! empty ( $ this -> userid ) ) { $ mform -> addElement ( 'hidden' , 'gpr_userid' , $ this -> userid ) ; $ mform -> setType ( 'gpr_userid' , PARAM_INT ) ; } if ( ! empty ( $ this -> groupid ) ) { $ mform -> addElement ( 'hidden' , 'gpr_groupid' , $ this -> groupid ) ; $ mform -> setType ( 'gpr_groupid' , PARAM_INT ) ; } if ( ! empty ( $ this -> page ) ) { $ mform -> addElement ( 'hidden' , 'gpr_page' , $ this -> page ) ; $ mform -> setType ( 'gpr_page' , PARAM_INT ) ; } }
docstring: Add hidden elements into mform
  
  @param object &$mform moodle form object
  
  @return void
docstring_tokens: Add hidden elements into mform