Skip to content

CP3108 Game Component - Backend Modification #581

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

Closed

Conversation

Cheng20010201
Copy link
Contributor

@Cheng20010201 Cheng20010201 commented Apr 13, 2020

In coordination with source-academy/frontend#1058

Student Game Experience

Game state data for users (e.g. collectibles, quest progress) was previously stored locally. Should the user clear their browsing data or switch devices, this data is lost, causing the user to lose their progress and creating a discontinuity in the game experience.

The cadet backend has been extended to accommodate the storage of the user's game state data. The persistent storage of game data will provide a more cohesive game experience for students.

For more documentation, please see https://github.com/source-academy/cadet/wiki/Game

athuyaoo and others added 7 commits April 22, 2020 05:21
Modified this to fit collectible system.
Modified this to fit our collectible system.
This change is to fit the testing format.
Merge ground control with our Collectibles System.
@Cheng20010201
Copy link
Contributor Author

should be functionally complete now

@Wong-ZZ
Copy link
Contributor

Wong-ZZ commented Apr 23, 2020

Can I just check, does the Game Component require the GroundControl component cause your current PR includes the GroundControl Component as well

@Cheng20010201
Copy link
Contributor Author

Can I just check, does the Game Component require the GroundControl component cause your current PR includes the GroundControl Component as well

I think that is the case.

import Cadet.Assessments
import Cadet.GameStates
import Ecto.Repo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import Ecto.Repo is unused and can be removed

@Cheng20010201
Copy link
Contributor Author

Cheng20010201 commented Apr 23, 2020

Changes proposed by the rerviewer have been resolved and tested.

angelsl pushed a commit that referenced this pull request May 22, 2020
Merges #581

Squashed commit of the following:

commit 03fb0c4753b2a10fc34d5861caa9b18ed8e60723
Author: angelsl <[email protected]>
Date:   Sat May 23 01:13:35 2020 +0800

    Fix formatting and Credo lints

commit 2f346227ea19ef15012fcd39b99f773b4fdbce0b
Merge: a46af78 0593ca9
Author: angelsl <[email protected]>
Date:   Sat May 23 01:09:30 2020 +0800

    Merge branch 'sa_2021' into rebase

commit a46af78
Author: Yuc Sun <[email protected]>
Date:   Wed Apr 29 20:00:49 2020 +0800

    modified positioning of test cases

commit f2e3b3f
Author: Yuc Sun <[email protected]>
Date:   Wed Apr 29 19:46:42 2020 +0800

    fix issues proposed

commit b71612a
Author: Yuc Sun <[email protected]>
Date:   Wed Apr 29 19:44:01 2020 +0800

    fix issues proposed by reviewer

commit 1525c25
Author: Yuc Sun <[email protected]>
Date:   Thu Apr 23 19:54:21 2020 +0800

    Some format change to adhere to backend style

commit 9e7f141
Author: Yuc Sun <[email protected]>
Date:   Thu Apr 23 19:15:20 2020 +0800

    Modified Module Name

commit c34784c
Merge: 0d59384 6597a3e
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 23 00:32:58 2020 +0800

    Merge pull request #2 from Source-Academy-Game/mergeGroundControl

    Merge ground control with our Collectibles System.

commit 0d59384
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 23 00:29:16 2020 +0800

    Added tests on collectible system

commit cca29ea
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 23 00:26:32 2020 +0800

    Eliminated one compile warning

commit 3ff9e52
Author: Cheng20010201 <[email protected]>
Date:   Wed Apr 22 18:11:28 2020 +0800

    Minor change to user.ex

    This change is to fit the testing format.

commit a47cbab
Author: Cheng20010201 <[email protected]>
Date:   Wed Apr 22 18:09:24 2020 +0800

    Update accounts_test.exs

    Modified this to fit our collectible system.

commit 45448ba
Author: Cheng20010201 <[email protected]>
Date:   Wed Apr 22 18:07:27 2020 +0800

    Modified user_controller_test.exs

    Modified this to fit collectible system.

commit 6597a3e
Author: travisryte <[email protected]>
Date:   Wed Apr 22 05:21:32 2020 +0800

    Ran Mix Format

commit 0a4cdb3
Merge: 3c3c780 ae7beac
Author: travisryte <[email protected]>
Date:   Tue Apr 21 22:45:12 2020 +0800

    Merge branch 'ground_control' into mergeGroundControl

commit ae7beac
Author: ScrubWzz <[email protected]>
Date:   Mon Apr 20 18:33:39 2020 +0800

    Updated AssessmentOverview schema

commit 5d4e6d8
Author: ScrubWzz <[email protected]>
Date:   Mon Apr 20 14:11:52 2020 +0800

    Minor formatting change

commit c7f01c2
Author: ScrubWzz <[email protected]>
Date:   Mon Apr 20 13:48:59 2020 +0800

    Changed assessment deletion such that associated submissions are also deleted

commit 159a2d3
Author: ScrubWzz <[email protected]>
Date:   Mon Apr 20 13:39:55 2020 +0800

    Updated XML parsers tests

commit 7663bf2
Author: ScrubWzz <[email protected]>
Date:   Mon Apr 20 02:26:25 2020 +0800

    Modified AssessmentsController tests to fit with changes to how the is_published parameter is now handled

commit 1a07757
Author: ScrubWzz <[email protected]>
Date:   Sun Apr 19 22:22:55 2020 +0800

    Fixed format

commit b39ad61
Author: ScrubWzz <[email protected]>
Date:   Sun Apr 19 22:15:26 2020 +0800

    Added swagger paths

commit 3c3c780
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 16 11:44:32 2020 +0800

    Add function to differentiate students from others

commit 3ca9dc6
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 16 11:23:20 2020 +0800

    Added status codes information

commit 3d5e37d
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 16 11:19:56 2020 +0800

    Added status codes information

commit efbc305
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 16 11:19:24 2020 +0800

    Update game_states.ex

commit 0f59ab0
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 16 03:44:25 2020 +0800

    Solved no status codes error

commit 34c4567
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 16 03:43:00 2020 +0800

    Fixed no status codes error

    Also, satisfied frontend's need to make gameStates an object to input. Maintained consistency with other parts of the backend.

commit 8c956cf
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 16 02:55:42 2020 +0800

    Update user_view.ex

commit 53141ea
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 16 02:52:51 2020 +0800

    Add files via upload

commit 9d482c1
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 16 02:52:17 2020 +0800

    Delete add_game_states

commit 72d9744
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 16 02:45:56 2020 +0800

    Delete 20200402094115_add_user_game_states.exs

commit e3eddd6
Author: ScrubWzz <[email protected]>
Date:   Wed Apr 15 20:50:49 2020 +0800

    Fixed bug when force updating assessments that are not opened. Added requirement that all question types remain the same when force updating

commit c0c73c9
Author: ScrubWzz <[email protected]>
Date:   Wed Apr 15 18:13:17 2020 +0800

    Changed variable naming

commit 4ca0ffb
Merge: fbdf592 8654b13
Author: Cheng20010201 <[email protected]>
Date:   Mon Apr 13 21:14:49 2020 +0800

    Merge branch 'sa_2021' into master

commit fbdf592
Author: Cheng20010201 <[email protected]>
Date:   Fri Apr 10 17:15:53 2020 +0800

    Update user_controller.ex

commit 71f1ac9
Author: Cheng20010201 <[email protected]>
Date:   Fri Apr 10 17:07:44 2020 +0800

    fixed a consistency problem

commit 3f2bcb3
Author: Cheng20010201 <[email protected]>
Date:   Fri Apr 10 16:06:57 2020 +0800

    Update game_states.ex

commit 6b42190
Author: Cheng20010201 <[email protected]>
Date:   Fri Apr 10 16:06:07 2020 +0800

    Update user_controller.ex

commit 39791c3
Author: Cheng20010201 <[email protected]>
Date:   Fri Apr 10 16:05:33 2020 +0800

    Update router.ex

commit ac472d3
Author: Cheng20010201 <[email protected]>
Date:   Fri Apr 10 16:05:02 2020 +0800

    Create add_game_states

commit 2053868
Author: travisryte <[email protected]>
Date:   Thu Apr 2 01:52:01 2020 +0800

    Update to allow for xml files

commit 26ac37c
Author: jiachen <[email protected]>
Date:   Wed Jan 29 22:07:49 2020 +0800

    Update README.md (#570)

commit 5bb40e9
Author: Cheng20010201 <[email protected]>
Date:   Fri Apr 10 13:53:39 2020 +0800

    Added some functios regarding game states.

commit 14f5025
Author: Cheng20010201 <[email protected]>
Date:   Fri Apr 10 13:51:41 2020 +0800

    Added some routes regarding game states.

commit 0218305
Author: Cheng20010201 <[email protected]>
Date:   Fri Apr 10 13:50:49 2020 +0800

    Added few functions regarding game data

commit 5a865d9
Author: ScrubWzz <[email protected]>
Date:   Tue Apr 7 21:47:10 2020 +0800

    Minor edit

commit 431a058
Author: ScrubWzz <[email protected]>
Date:   Mon Apr 6 21:22:00 2020 +0800

    Added GroundControl

commit 210cff6
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 2 20:54:04 2020 +0800

    make changes to model the behavior of game_states

    changed from the previous collectibles version to game_states version. add a few to-dos for futrue implementation of save_data related functions. Also noted that the error handling part is not implemented yet, which is also a to-do.

commit e92b5c0
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 2 20:51:13 2020 +0800

    added one line to be consistent with migration

commit 9635a2b
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 2 20:49:32 2020 +0800

    updated to game_states version

    Updated to game_states version and added some to-dos for the save_data part

commit 18375b5
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 2 20:47:58 2020 +0800

    changed some post actions to put actions

commit 16323c9
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 2 20:46:32 2020 +0800

    added trivial change to maitain consitency

commit d052ce4
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 2 20:45:00 2020 +0800

    Delete original collectibles.

commit 709e02a
Author: Cheng20010201 <[email protected]>
Date:   Thu Apr 2 20:44:08 2020 +0800

    Add a game_states column to the database.

commit d2fc579
Author: Cheng20010201 <[email protected]>
Date:   Mon Mar 30 20:40:03 2020 +0800

    Update collectibles.ex

commit b22dc98
Author: Cheng20010201 <[email protected]>
Date:   Sun Mar 29 19:44:32 2020 +0800

    Update user_controller.ex

commit bcf34a9
Author: Cheng20010201 <[email protected]>
Date:   Sun Mar 29 19:42:32 2020 +0800

    Update router.ex

commit 517dca7
Author: Cheng20010201 <[email protected]>
Date:   Sun Mar 29 19:41:21 2020 +0800

    Update collectibles.ex

commit 495a915
Author: Cheng20010201 <[email protected]>
Date:   Fri Mar 27 14:48:37 2020 +0800

    Create collectibles.ex

commit bed98a9
Author: Cheng20010201 <[email protected]>
Date:   Fri Mar 27 14:46:59 2020 +0800

    Update user_view.ex

commit faca0ca
Author: Cheng20010201 <[email protected]>
Date:   Fri Mar 27 14:46:01 2020 +0800

    Update router.ex

commit 2acbf8a
Author: Cheng20010201 <[email protected]>
Date:   Fri Mar 27 14:44:52 2020 +0800

    Update user_controller.ex

commit 82605a9
Author: Cheng20010201 <[email protected]>
Date:   Fri Mar 27 14:43:53 2020 +0800

    Add files via upload

commit 9c9702c
Author: Cheng20010201 <[email protected]>
Date:   Fri Mar 27 14:42:16 2020 +0800

    Update user.ex
@angelsl
Copy link
Contributor

angelsl commented May 22, 2020

Merged in b2ee3d5. Unfortunately the "allow maintainers to add commits" option was off, so I couldn't rebase and merge as I normally do.

@angelsl angelsl closed this May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants