You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we construct the appropriate milestone groups and milestones for a child on the fly based on their age, in get_milestone_groups
We then only create a MilestoneAnswer, and if needed a new MilestoneAnswerSession, when an answer is submitted.
This is robust to changes in which milestones are included by get_milestone_groups, but it is not ideal for calculating the traffic light feedback, in particular the age-appropiate milestones may have changed, and we also need to know if there were milestones that were not answered.
For calculating the feedback, it would be better if all the MilestoneAnswers were created when a MilestoneAnswerSession is created, and for the milestone group to be easily determined from a MilestoneAnswer.
Todo:
get_milestone_groups
should call get_or_create_current_milestone_answer_session
get_or_create_current_milestone_answer_session
should create a MilestoneAnswer for each milestone in the session
with none or equivalent as the answer
get_current_milestone_answer_session
maybe combine with get milestone groups?
it could return e.g. {milestones: ..., answers: ...}, now that both are created together
MilestoneAnswer
should have a milestone_group_id field for convenience when calculating feedback / stats
needs a none value for the answer (this could be e.g. -1)
frontend milestone component
update logic accordingly
The text was updated successfully, but these errors were encountered:
- MilestoneAnswer
- An answer is now created for every milestone when an answer session is created
- The initial value of the answer is `-1` which indicates the user has not yet submitted an answer for this milestone
- Add `milestone_group_id` field for convenience when calculating statistics / feedback
- get_milestone_groups
- Now returns the milestones according to the MilestoneAnswers for the current session
- This means the set of milestones is fixed and doesn't change even if a milestone expected_age changes such that it would no longer be selected for that session
- update_milestone_answer
- no longer creates an answer session if there is no existing unexpired one
- either updates the existing answer for the supplied session, or returns 404 or 401
- Milestone component
- all answers now exist, replace check for existence with check for `-1` to determine if the answer has already been answered
- add types-python-dateutil to mypy pre-commit hook dependencies
- remove out-dated comment & type ignores from related code
- resolves#189
…191)
- MilestoneAnswer
- An answer is now created for every milestone when an answer session is created
- The initial value of the answer is `-1` which indicates the user has not yet submitted an answer for this milestone
- Add `milestone_group_id` field for convenience when calculating statistics / feedback
- get_milestone_groups
- Now returns the milestones according to the MilestoneAnswers for the current session
- This means the set of milestones is fixed and doesn't change even if a milestone expected_age changes such that it would no longer be selected for that session
- update_milestone_answer
- no longer creates an answer session if there is no existing unexpired one
- either updates the existing answer for the supplied session, or returns 404 or 401
- Milestone component
- all answers now exist, replace check for existence with check for `-1` to determine if the answer has already been answered
- add types-python-dateutil to mypy pre-commit hook dependencies
- remove out-dated comment & type ignores from related code
- resolves#189
Currently we construct the appropriate milestone groups and milestones for a child on the fly based on their age, in
get_milestone_groups
We then only create a
MilestoneAnswer
, and if needed a newMilestoneAnswerSession
, when an answer is submitted.This is robust to changes in which milestones are included by get_milestone_groups, but it is not ideal for calculating the traffic light feedback, in particular the age-appropiate milestones may have changed, and we also need to know if there were milestones that were not answered.
For calculating the feedback, it would be better if all the MilestoneAnswers were created when a MilestoneAnswerSession is created, and for the milestone group to be easily determined from a MilestoneAnswer.
Todo:
none
or equivalent as the answer{milestones: ..., answers: ...}
, now that both are created togethermilestone_group_id
field for convenience when calculating feedback / statsnone
value for the answer (this could be e.g. -1)The text was updated successfully, but these errors were encountered: