original_string: public function can_edit_instance($instance) {
          $context = context_course::instance($instance->courseid);
  
          return has_capability('enrol/' . $instance->enrol . ':config', $context);
      }
code: public function can_edit_instance($instance) {
          $context = context_course::instance($instance->courseid);
  
          return has_capability('enrol/' . $instance->enrol . ':config', $context);
      }
code_tokens: public function can_edit_instance ( $ instance ) { $ context = context_course :: instance ( $ instance -> courseid ) ; return has_capability ( 'enrol/' . $ instance -> enrol . ':config' , $ context ) ; }
docstring: Return whether or not, given the current state, it is possible to edit an instance
  of this enrolment plugin in the course. Used by the standard editing UI
  to generate a link to the edit instance form if editing is allowed.
  
  @param stdClass $instance
  @return boolean
docstring_tokens: Return whether or not given the current state it is possible to edit an instance of this enrolment plugin in the course . Used by the standard editing UI to generate a link to the edit instance form if editing is allowed .