The "include user role assignments" tickbox in backup/restore does not seem to affect whether role assignments are included in the backup. Role assignments are always included, despite messages during restore to the contrary.
=== Steps to reproduce ===
1. As Admin, create a course, and enable the student self-enrolment method
2. Manually add another user as a Teacher in this course, using Course administration > Users > Enrolled users
3. Log in as a third user, and self-enrol in the course as a student
4. Log in as Admin and backup the course. Tick "include enrolled users", but untick "include user role assignments" [If "include enrolled users" were unticked, then "include user role assignments" would be greyed out, as expected.]
5. Restore from this backup as a new course. The "Include user role assignments" option will appear as a red cross.
6. Click on Participants in the new course - both the Teacher and Student are present and correct.
7. Click on Users > Enrolled users - both the Teacher and Student are present and correct with their original enrolment methods attached.
=== Expected behaviour ===
No users should be shown in the Participants list nor in the Enrolled Users list.
=== Actual behaviour ===
All roles and enrolment methods originally assigned are still in place.
NB: I have verified that no category or system level roles were assigned to either user.