Skip to content

Educator version #981

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

Open
wants to merge 80 commits into
base: main
Choose a base branch
from
Open

Educator version #981

wants to merge 80 commits into from

Conversation

sgfost
Copy link
Contributor

@sgfost sgfost commented Mar 15, 2025

Provide a minimal, educator version of Port of Mars for MS/HS students and teachers which is implemented as an additional 'mode' for the app to be deployed in (SHARED_APP_MODE=educator in .env)

Currently deployed for testing at https://learn.portofmars.asu.edu/

closes #883

saachibm and others added 30 commits February 18, 2025 12:01
- a Teacher can have multiple Classrooms
- a Classroom can have multiple Students
- Students are one-to-one with Users which lets them participate in Games
- Teachers are one-to-one with Users which lets them sign into the
  website (may need to revisit this part of the schema)

Co-authored-by: Tkawamura02 <[email protected]>
Co-authored-by: Allen Lee <[email protected]>
Co-authored-by: Scott Foster <[email protected]>
Co-authored-by: Sabrina Nelson <[email protected]>
pending a feature flag, these routes/components will be part of an entirely different layout

Co-authored-by: sbmota <[email protected]>
Co-authored-by: Allen Lee <[email protected]>
Co-authored-by: Sabrina Nelson <[email protected]>
isTeacher flag gets added to the user object in client state when
needed

We should be able to get away with no other (or very minimal)
changes to the client state by repurposing the lobby object similar to
how we do so for freeplay/tournament lobbies
* moved dev login function on the client to AuthAPI

TODO:
* add generation of a passcode for signing back in as an existing
  student. either create a new strategy or modify existing to also take
  this auth token for signing back in
* create the rest of the login flow, intermediate page for entering
  name, signing back in (passcode can be the response from a set-name
  call)

Co-authored-by: saachibm <[email protected]>
Co-authored-by: Sabrina Nelson <[email protected]>
…in classroom lobby components for student-confirm page
+ some minor cleanup

CONTAINS MIGRATION
ref virtualcommons#943

Co-authored-by: Sabrina Nelson <[email protected]>
Co-authored-by: Kelly Tran <[email protected]>
Co-authored-by: Allen Lee <[email protected]>
classroom authToken, and student rejoinCode.

+ created test suites
STEPS TO UPDATE LOCAL ENV:

- make clean
- ./configure dev
- make .env
- (optionally) update SHARED_APP_MODE in .env, new way to set educator
  mdoe
- make deploy
kellytea and others added 24 commits February 18, 2025 12:01
- restyled modals
- fixed type errors
- dashboard UI fixes
isTeacher and isStudent roles determine access to the dashboard and
lobby respectively

* fix some type errors and remove comments
as a workaround for the game server not being available in tests
group.clients and state.clients are separate objects in the lobby, so
setting accepted on state.clients did not satisfy the condition of
group.allClientsAccepted so the timeout would always expire
to be used for building a better game 'report' for completed games

Co-authored-by: Sabrina Nelson <[email protected]>
Co-authored-by: Kelly Tran <[email protected]>
- set `SHARED_APP_MODE=educator` in `.env`
- set `DEPLOY_ENVIRONMENT=learn` in `config.mk`
need to use `import.meta.env` instead of `process.env` on the
client-side
@sgfost sgfost added the enhancement New feature or request label Mar 15, 2025
@sgfost sgfost mentioned this pull request Mar 15, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

educator version
5 participants