Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

teachers with no school cannot save created levels #1627

Open
evemartin opened this issue May 29, 2024 · 5 comments
Open

teachers with no school cannot save created levels #1627

evemartin opened this issue May 29, 2024 · 5 comments
Assignees
Labels
bug cadets volunteers Tasks that can be picked up by anyone

Comments

@evemartin
Copy link
Contributor

evemartin commented May 29, 2024

If a teacher is not part of a school and attempts to save a created level, they get the following error and the level is not saved:

Screenshot from 2024-05-29 09-54-06

As evidenced by the GCP logs, this might be due to an inaccurate check in level_editor.py's save_level_for_editor which is meant to check whether the user is in a school or not but actually just checks whether the user is an independent or not:

Screenshot from 2024-05-29 09-55-42

To fix the bug, this if check will probably have to be changed.

Steps to reproduce the bug:

  1. Log in as a teacher with no school (or, log in as a standard teacher then leave the school, or delete the school in the Django admin panel)
  2. Go straight to the Rapid Router Level Editor without adding a school
  3. Create a valid level and attempt to save it
  4. The error shown above should appear
@lauracumming
Copy link

Ah yes! That's it. Thanks @evemartin

@lauracumming
Copy link

Hey team! Please add your planning poker estimate with Zenhub @evemartin @faucomte97 @SKairinos

@ocadotechnology ocadotechnology deleted a comment from evemartin Nov 13, 2024
@faucomte97 faucomte97 added bug volunteers Tasks that can be picked up by anyone cadets labels Nov 13, 2024
@Noah-Bakr
Copy link

Hey, I'm interested in this issue. I have experience with save game systems and python - I will happily be assigned :)

@Noah-Bakr
Copy link

Hello, while running the website through a dev container on my local machine, I attempted to make a teacher account that wasn't connected to a school. Unfortunately, I could not sign in to my account since it needed an email verification - and that email never arrived. Do I have to manually add a teacher record with '0' as the school ID?

Thanks

@SKairinos
Copy link
Contributor

SKairinos commented Jan 9, 2025

Hello. There are 2 options:

  1. When running the app locally, all emails are printed in the console. You can inspect the console and grab the verification link embedded in the printed email. Remember that emails are basically just HTML docs under the hood - so look for a bunch of printed HTML.
  2. You can set the is_verified field on the user profile model to true for the specific teacher by running an update SQL statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cadets volunteers Tasks that can be picked up by anyone
Projects
None yet
Development

No branches or pull requests

5 participants