cmu-sei / Gameboard

2 stars 3 forks source link

Revamp import/export #509

Open sei-jbooz opened 1 month ago

sei-jbooz commented 1 month ago

The current implementation of game import/export has not been touched in a while, so it only partially works and is missing game/challenge configuration options that have been added to GB in recent versions.

The new implementation should probably result in a zip file download on export and upload of the same zip structure on import.

The zip should contain all data needed to configure the game:

  1. All settings/metadata
  2. All challenge specs
  3. All images (game card and board)
  4. Should also allow you to muli-select games to export/import multiple at once
  5. The UI should tell you how many games/specs were exported. Then on import, it should tell you how many games/specs were successfully imported/skipped (see below for skipping)

Constraints / Design Points:

  1. It is ok to assume GB will have access to talk to the game engine to import challenge specs and to assume that the specs will have the same external GUID
  2. It is ok to assume that all GUIDs that are imported will be ok to use on import. If a duplicate Game/Challenge Spec GUID is found, it is ok to skip that item on import - but we should tell the user about it.
  3. GB should include all game / spec metadata and configurations with the export -- it is ok to assume that the new GB wants exactly the same config that was exported a. One small caveat here is that I think we should mark games as "Hidden" on import so an admin has time to check things over before imported items are visible to un-priv'd users in the UI.
  4. We don't want to have to touch the logic of import/export much if the game entity evolves over time, so the design should account for this flexibility