Skip to content

Game: Allow consistent, automatic switching between Game and Assessments #3105

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

Merged
merged 13 commits into from
Apr 4, 2025

Conversation

JustATin555
Copy link
Contributor

@JustATin555 JustATin555 commented Feb 28, 2025

Description

  • Cadets are able to submit minigames from within the Assessment Workspace and are then prompted to close the window and return to game
  • userstate.assessments.id and navigateToAssessment() use the number instead of id
  • An assessment type can be marked as a minigame from the Admin Panel

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Code quality improvements

How to test

  • Passed all testcases
  • Properly loads assessments in both Assessment Overview and Assessments Workspace
  • Can load assessments from GroundControl

Checklist

  • I have tested this code
  • I have updated the documentation

@JustATin555 JustATin555 self-assigned this Feb 28, 2025
@JustATin555 JustATin555 marked this pull request as ready for review March 27, 2025 03:09
@coveralls
Copy link

coveralls commented Mar 27, 2025

Pull Request Test Coverage Report for Build 14187283563

Details

  • 4 of 8 (50.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 31.108%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/commons/controlBar/ControlBarSubmit.tsx 1 2 50.0%
src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx 0 1 0.0%
src/commons/assessmentWorkspace/AssessmentWorkspace.tsx 3 5 60.0%
Totals Coverage Status
Change from base Build 14178090272: 0.01%
Covered Lines: 4892
Relevant Lines: 14835

💛 - Coveralls

@lhw-1 lhw-1 changed the title Allow consistent, automatic switching between Game and Assessments Game: Allow consistent, automatic switching between Game and Assessments Apr 1, 2025
Copy link
Collaborator

@lhw-1 lhw-1 left a comment

Choose a reason for hiding this comment

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

There does not seem to be major issues with the PR. @JustATin555 Are you able to include screenshots of UI changes?

Also, once the PR is merged, we'll need to update the game dev guide and the storywriter guide for relevant portions on the id vs number.

@JustATin555 JustATin555 requested a review from RichDom2185 April 3, 2025 09:43
@JustATin555
Copy link
Contributor Author

image
Added column for isMinigame toggle.

@JustATin555
Copy link
Contributor Author

image
Direct submission button shown for minigames.

@JustATin555
Copy link
Contributor Author

image
Message shown after submission.

@lhw-1
Copy link
Collaborator

lhw-1 commented Apr 3, 2025

Message shown after submission.

Hmm... I wonder if the window might be a bit too different from the current assessment windows? (IIRC there is no window for submission on the workspace itself, but there is a window for submission from assessment list that looks a bit different)

@RichDom2185 Any thoughts on standardizing styles for popup windows? I am ok with this for now since this will only be the case for the minigame, though I suspect that in the long run we want to minimize edge cases like this..

@JustATin555
Copy link
Contributor Author

@lhw-1 the window is a modified copy of the assessment briefing card. Will likely refactor into a more standardised React component if time permits later on.

@lhw-1
Copy link
Collaborator

lhw-1 commented Apr 3, 2025

My main concern is that assessments opened by the minigame are functioning differently from the regular assessments when I'm not sure if there is a need for that - can I check if the plan is to show these minigame assessments via the assessment list, or if they are only accessible through the game chapters?

@JustATin555
Copy link
Contributor Author

Should only be accessible through the game chapters - the category would have "display in dashboard" disabled.

@lhw-1
Copy link
Collaborator

lhw-1 commented Apr 3, 2025

Should only be accessible through the game chapters

Alright, in that case we can go ahead with it. We can revisit the standardization at a later date as needed.

Copy link
Collaborator

@lhw-1 lhw-1 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @JustATin555 for the PR! This is a nice update and should allow us to add back chapter-specific assessments, perhaps even in the form of minigames.

Copy link
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@RichDom2185 RichDom2185 merged commit 42b8271 into master Apr 4, 2025
8 checks passed
@RichDom2185 RichDom2185 deleted the assessment-redirect-to-game branch April 4, 2025 01:36
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