specify course_id in all StudentModule 'get' calls
StudentModule specifies student, course id, and module state key must all be unique together. The reset code in module_tree_reset was calling get without specifying course_id which means if two courses (with different course ids) share the same users and module state keys then calling StudentModule.objects.get with only the student and module state key raises an error for users that tried both courses. Specifying all unique_together fields fixes the issue.
Showing
Please
register
or
sign in
to comment