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

feat(Multilingual Unit): Log selected language and load previous-selected language on VLE start #1866

Conversation

hirokiterashima
Copy link
Member

@hirokiterashima hirokiterashima commented Jul 18, 2024

Changes

  • When in student run mode
    • Log language selection events in the event table. Every time the student switches a language, we save an event.
    • Display unit in previously-selected language, if applicable

Test

  • In a student run for a unit with multiple languages
    • switch between different languages on different steps. In the database, check that the events are saved in the events table.
      • The event name is "languageSelected"
      • The event data is {"requester":"user","language":"[LOCALE]"}
      • You should also see a row for {"requester":"system","language":"[LOCALE]"}. This is saved when the VLE loads, it looks up the last-saved language in StudentStatus and switches to it
    • Refresh the browser, or exit -> reload the unit. The unit should be rendered in your last-saved language.
  • In a student run for a unit without multiple languages, everything works as before

@hirokiterashima hirokiterashima added the enhancement New feature of any size or improvement (UI, performance, security) label Jul 18, 2024
@hirokiterashima hirokiterashima self-assigned this Jul 18, 2024
@hirokiterashima hirokiterashima marked this pull request as ready for review July 18, 2024 02:37
Copy link
Member

@breity breity left a comment

Choose a reason for hiding this comment

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

Looks good. 👍

Copy link
Member

@geoffreykwan geoffreykwan left a comment

Choose a reason for hiding this comment

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

Looks good.

@hirokiterashima hirokiterashima merged commit c128573 into issue-1513-multiple-languages-per-unit Jul 29, 2024
@hirokiterashima hirokiterashima deleted the multilingual-unit-log-chosen-language branch July 29, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature of any size or improvement (UI, performance, security)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants