I think a good way to deal with this would be assignments that also (partly) prepare you for the written exam. So if you sit down and do it yourself and actually understand the assignment you already did some learning for the exam.
I had one course at university with homework assignments that were super tough. I did it all by myself but in the end I learned so much that I didn't even need to study for the written exam and got a top grade. Others who did not do their assignments on their own had to study hard for the written exam and in most cases got way worse grades or failed.
I still find it crazy that those books existed in the first place. When I grew up you only needed a name and you could look it up in the yellow pages to get their phone number and address.
However, where I lived it was possible to opt out from this.