4a99cae69d
There were a couple of incorrect SQL queries when the user calling the function is a teacher and the activity uses separate groups.