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

Update Quiz creation to reference unique questions by way of the item property #12127

Open
2 tasks
nucleogenesis opened this issue May 2, 2024 · 0 comments
Open
2 tasks
Assignees
Labels
help wanted Open source contributors welcome P0 - critical Priority: Release blocker or regression TAG: tech update / debt Change not visible to user

Comments

@nucleogenesis
Copy link
Member

Overview

Quiz questions use a composite ID joining the question's exercise_id (the Exercise it came from) and it's question_id, an ID for the question within that particular Exercise. This is to avoid collisions if two Exercises have the same question_id in them.

Elsewhere in the codebase, we use the same type and shape of ID -- for example, in logging.

In those cases, each question-shaped object has a property item to reference this unique ID. We should do this everywhere!

Acceptance criteria

  • Update quizCreationSpecs.js definition of id and change it to item.
  • Reviewing useQuizCreation selectQuestions and the components in <coach>/../plan/CreateExamPage/* - revise naming throughout to no longer reference "Question IDs" as a concept when, in fact, it is referencing the Question Item. The changes here should distinguish between a question's question_id -- in which case the naming convention referencing "Question ID" would make sense.

For example, in selectQuestions.js the 4th parameter questionIdArrays is actually referencing a question's "item", so perhaps questionItemArrays would make more sense.

Similar instances can be found throughout (ex1, ex2, ex3

@nucleogenesis nucleogenesis added TAG: tech update / debt Change not visible to user help wanted Open source contributors welcome P0 - critical Priority: Release blocker or regression labels May 2, 2024
@nucleogenesis nucleogenesis self-assigned this May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Open source contributors welcome P0 - critical Priority: Release blocker or regression TAG: tech update / debt Change not visible to user
Projects
None yet
Development

No branches or pull requests

1 participant