MDL-45721 core_backup: only trigger the course_restored event when restoring a course