When I print out the $restore variable, it doesn't even have $restore->course_files, but does have $restore->restore_course_files. This fix does work for me.
Backup and restore
Import course data: files aren't included (with solution)
This discussion has been locked so you can no longer reply to it.