piersharding/moodle-tool_uploadcourse — pull request #8 by pauln (2013-03-14 21:07:46+00:00)
Title: Fix for adding new (default) enrol instance

add_default_instance returns the ID, not an object - so we need to feed its return into $instance->id rather than feeding it directly into $instance.