Fixed issue with course restore: Call to undefined function sync_enrolments_partial