original_string: public function edit_field_set_required($mform) {
          global $USER;
          if ($this->is_required() && ($this->userid == $USER->id || isguestuser())) {
              $mform->addRule($this->inputname, get_string('required'), 'required', null, 'client');
          }
      }
code: public function edit_field_set_required($mform) {
          global $USER;
          if ($this->is_required() && ($this->userid == $USER->id || isguestuser())) {
              $mform->addRule($this->inputname, get_string('required'), 'required', null, 'client');
          }
      }
code_tokens: public function edit_field_set_required ( $ mform ) { global $ USER ; if ( $ this -> is_required ( ) && ( $ this -> userid == $ USER -> id || isguestuser ( ) ) ) { $ mform -> addRule ( $ this -> inputname , get_string ( 'required' ) , 'required' , null , 'client' ) ; } }
docstring: Sets the required flag for the field in the form object
  
  @param moodleform $mform instance of the moodleform class
docstring_tokens: Sets the required flag for the field in the form object