Skip to content
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

Improve Question tagging and Track progress #693

Closed
wants to merge 15 commits into from

Conversation

johnarban
Copy link
Collaborator

This PR makes changes to help with accurately tracking progress and questions in the dashboard.

  • Make sure we know which stage questions belong to. This is done by passing the COMPONENT_STATE to the question creation functions (some additional logic is included to capture questions from students who have gone through the story already).
  • Calculate the progress in the stage. Because out stages can change, this makes sure the COMPONENT_STATE tracks the progress itself via two new computed fields max_step and progress (a float on (0, 1])

@@ -114,6 +115,22 @@ class ComponentState(BaseComponentState, BaseState):
velocity_reflection_state: VelocityReflection = VelocityReflection()
reflection_complete: bool = False
show_dop_cal4_values: bool = False

Copy link
Member

Choose a reason for hiding this comment

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

My one suggestion would be that we move these two computed fields into the BaseComponentState class so that we don't have to maintain this five times.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I thought this would be a good thing to have in the base component state as well. I will add that

@patudom
Copy link
Contributor

patudom commented Jan 2, 2025

@johnarban, I have a few additional comments:

  • Are we sure the markers are indexed from 0? I am on the last marker on Stage 4, and it is giving me a progress of 106%, which makes me think they might be indexed from 1.
Screenshot 2025-01-02 at 2 23 00 PM
  • Stage 2 is basically just the slideshow, so we might want to think in terms of measuring progress as the slideshow_step / slideshow_length
  • Stage 6 is not padded with an extra marker, so I think progress should divide by (self.total_steps) instead of (self.total_steps - 1)
  • Per Jon's point about refactoring the computed fields to the common BaseComponentState class, I guess we could have a marker_list_padded prop or just pad Stage 6 so they are all padded.

@johnarban
Copy link
Collaborator Author

I have pushed the tracking to the BaseComponentState, and modify the appropriate computed properties in ComponentState subclass for each story. The stage 2 slideshow should track the slideshow's max_step_completed

@johnarban johnarban force-pushed the Fixes-for-Dashboard branch from 3d47f2f to 38c5091 Compare January 27, 2025 23:20
@johnarban johnarban closed this Jan 27, 2025
@johnarban johnarban mentioned this pull request Jan 27, 2025
@johnarban
Copy link
Collaborator Author

closed because it now ahead of #774. See new PR #775

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.

3 participants