kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

fix: Handle session timeout during Quiz Creation in Coach

Open GarvitSinghal47 opened this issue 1 year ago • 7 comments

Fixes #11773

Summary

  1. Modified the router.beforeEach guard in Coach to handle session timeouts.
  2. Added a check for user login status.
  3. If the session times out, redirected users to the 'AuthMessage' page with the 'next' query parameter set to the path they were trying to access.
  4. After signing in, users are redirected back to the original destination.

References

Reviewer guidance


Testing checklist

  • [ ] Contributor has fully tested the PR manually
  • [ ] If there are any front-end changes, before/after screenshots are included
  • [ ] Critical user journeys are covered by Gherkin stories
  • [ ] Critical and brittle code paths are covered by unit tests

PR process

  • [ ] PR has the correct target branch and milestone
  • [ ] PR has 'needs review' or 'work-in-progress' label
  • [ ] If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • [ ] If this is an important user-facing change, PR or related issue has a 'changelog' label
  • [ ] If this includes an internal dependency change, a link to the diff is provided

Reviewer checklist

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

GarvitSinghal47 avatar Feb 14 '24 18:02 GarvitSinghal47

I am not well-versed- still learning about this. @rtibbles can you help and give a final look and we it merged?

AllanOXDi avatar Feb 26 '24 21:02 AllanOXDi

@rtibbles, I attempted something and am simply seeking clarification: Is the video below the desired output we're aiming for?

https://github.com/learningequality/kolibri/assets/82756460/fa5f07fc-efbb-402f-a828-7c23907f30c2

GarvitSinghal47 avatar Mar 30 '24 16:03 GarvitSinghal47

Yes, that looks like the same sort of pattern as we have used elsewhere.

rtibbles avatar Apr 10 '24 14:04 rtibbles

Hi @GarvitSinghal47, just chiming in - how are things going? Can we do something to support merging this work?

MisRob avatar Jun 11 '24 08:06 MisRob

Hi @MisRob ,

What I've observed in this issue is that there is already a system present for redirection and handling, but it is not working when the session expires or ends. This can be easily achieved by just passing the next parameter at the appropriate position, and the behavior in the above video is achieved using that.

I'd like to help further if I've misunderstood the required behavior once one of the core members reviews and confirms it. As mentioned above, I want to clarify that nothing is lost between merges.

GarvitSinghal47 avatar Jun 11 '24 10:06 GarvitSinghal47

@GarvitSinghal47 Ah I see, so is it you who needs to check on the merges at some point, right? Just trying to understand if you're waiting for something from the core team. Thank you.

MisRob avatar Jun 13 '24 16:06 MisRob

Closed by #12414

nucleogenesis avatar Jul 16 '24 15:07 nucleogenesis