by Sakshi Goel.
Hello Jukka ,
The course backup you are restoring is taken from which Moodle version.
While restoring the course please untick "User role assignment" and then try to restore it.