ocadotechnology / codeforlife-portal

The portal code for Code for Life
Other
49 stars 63 forks source link

Releasing a student doesn't unshare custom levels #2315

Open faucomte97 opened 3 weeks ago

faucomte97 commented 3 weeks ago

Describe the bug If a student who has created a custom levels is released by a teacher, their custom level remains shared with the teacher. Since the student no longer belongs to the school, this causes the teacher to see the error page instead of the levels page.

To Reproduce Steps to reproduce the behaviour:

  1. Prerequisites: Have a teacher account with a student who has created a custom level. Confirm the teacher can see the level in the shared levels.
  2. Release the student.
  3. Go back to the levels page.
  4. Notice that the page fails to load.

Expected behaviour When a student is released, it should also "unshare" all of their custom levels, as their are no longer in the school.