What worked for me was backing up the course again with no user data. Doing this allowed me to restore the course with no issues.
Re: Course restore fails with database write error - mdl_assisubm_assusegroatt_uix
per Vickie Anderson,
Number of replies: 0