ocadotechnology / codeforlife-portal

The portal code for Code for Life
https://www.codeforlife.education/
Other
51 stars 79 forks source link

Releasing a student doesn't unshare custom levels #2315

Closed faucomte97 closed 1 week ago

faucomte97 commented 5 months 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.

faucomte97 commented 2 weeks ago

LGTM

lauracumming commented 2 weeks ago

LGTM

lauracumming commented 1 week ago

LGTM (PROD)

faucomte97 commented 1 week ago

LGTM