FORMAT ====== The export contains three files: - `structure.json` describing how the game is composed and interconnected. - `events.json` listing all events that happened in the game (team actions). - `FORMAT.md` this file with documentation. Structure --------- It is a JSON file with following structure: - `info.name` with name of the game. - `info.trail_id` with internal trail ID (WordPress post ID). - `info.blog_id` with WordPress blog ID. - `sets` with array of sets of this game, one set contains following properties: - `set_id` - `name` - `slug` with the URL name, used for alphabetical sorting in ascending manner. - `last_modified` with datetime. - `fixed_points` with number of points for successful solutions of task in this set (without any hint used). - `is_bonus_set` with boolean whether this set is a bonus set. - `start_time` with time, only if set. - `end_time` with time, only if set. - `non_linear` with boolean whether the assignment in the set can be solved in any order. - `assignments` with array of IDs of assignments (see structure below). - `dependencies` describing when this set should be open/available: - `collections` with array of sets IDs after their completion this set should be opened / made available. - `lower_bound_points` with total team points when this set should opened / made available. - `assignments` with array of assignments, one assignment contains following properties: - `assignment_id` - `name` - `slug` with URL name. - `last_modified` with datetime. - `has_access_code` with boolean whether the given assignment has an access code. - `hints` with array of hints for the the assignment, each contains following properties: - `malus` with point penalization, `0` on total hints where no points are awarded for the assignment (except penalty for access hint). - `is_total` with boolean whether this is a total hint or only partial. - `code_to_show` - `time_to_show` - `dependencies` describing when this assignment should be open/available: - `tasks` with array of assignments IDs after their completion this set should be opened / made available. - `lower_bound_points` with total team points when this assignment should opened / made available. Events ------ It is a JSON file with list of events objects, each having `event_id`, `user_id` and `type`... Other properties differs by event types, see description below. The events are "sorted" by `user_id` in ascending manner and then by `event_id` in ascending manner. However this sorting is not perfect as aggregated events are at the place of their first saving instead of last saving (as would make sense). Event types are: - `GAME_START`: `time`. Planned time of start. - `GAME_STARTED`: `time`. Actual start. - `TASK_START`: `time` and `task_id`. Opening the task. - `TASK_HINT`: `time` and `task_id` and `task_hint_subid` describing which hint was taken (0, 1 ...). Opening of hint for the task. - `TASK_TRANSITION_HINT`: `task_id`. Opening of the transition hint. - `TASK_WRONG_ANSWER`: `task_id`, `time` and `value`. Particular wrong answer. - `TASK_CORRECT_ANSWER`: `task_id`, `time` and `value`. Particular correct answer as now there can be alternative answers. - `TASK_FINISHED`: `time` and `task_id`. Finishing the task (successfully or with hint) - `GAME_FINISHED`: `time` - `LAST_PROFILE_CHANGE`: `time` when the team has changed its profile last time. - `LAST_PROFILE_MEMBERS`: `value` number of team members (as updated by the team themselves). Aggregated (computed by the application later in the past, also known as cached) events, which may not be fully correct, especially in corner cases, are: - `TASK_TIME`: `task_id` and `value` with number time in seconds. Task solving time. - `TASK_POINTS`: `task_id` and `value` with awarded number of points. Awarded number of points. - `GAME_POINTS_SUM`: `value`. Total game points. - `GAME_TIME_SUM`: `value`. Sum of time of task in seconds. - `GAME_TIME_MAX`: `value`. Time of last solved task. And all aggregated events have property `aggregated` set to `true`. Notes ----- All timestamps are in year-month-day hour:minutes:seconds format in Europe/Prague timezone. Rarely event can appear twice, this is due unprevented multiple user submissions.