edited CourseEnableselfenrol.php to make it more robust

Updated the command to enable self enrolment on a course to be more robust. The original version of the command threw an exception if there was no instance of the self enrolment plugin in the course, this new version will add an instance of the plugin if none exists, and then enable it.