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

Updates to educator account creation #25

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/cds_portal/components/request_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,3 @@ def _update_form_data(new_data):
type="error",
children=[f"{validation_message.value}"],
)

solara.Markdown(f"{form_data}")
9 changes: 6 additions & 3 deletions src/cds_portal/components/setup_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def InitialSetup():

def _on_finished_clicked(*args):
Ref(GLOBAL_STATE.fields.initial_setup_finished).set(True)
router.push("/student_classes")
if GLOBAL_STATE.value.user.user_type == UserType.student:
router.push("/student_classes")
else:
router.push("/manage_classes")

with rv.Card():
with rv.CardTitle():
Expand Down Expand Up @@ -175,7 +178,7 @@ def _on_join_clicked(*args):

student_response = BASE_API.create_new_student(class_code.value)

if student_response.status_code != 200:
if student_response.status_code != 201:
student_validation_message.set(student_response.reason)
return

Expand All @@ -192,7 +195,7 @@ def _on_submit_clicked(*args):
form_data.value
)

if educator_response.status_code != 200:
if educator_response.status_code != 201:
educator_validation_message.set(educator_response.reason)
return

Expand Down