public function can_edit_instance($instance) {
        $context = context_course::instance($instance->courseid);

        return has_capability('enrol/' . $instance->enrol . ':config', $context);
    }
public function can_edit_instance($instance) {
        $context = context_course::instance($instance->courseid);

        return has_capability('enrol/' . $instance->enrol . ':config', $context);
    }
public function can_edit_instance ( $ instance ) { $ context = context_course :: instance ( $ instance -> courseid ) ; return has_capability ( 'enrol/' . $ instance -> enrol . ':config' , $ context ) ; }
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
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 .