-
Notifications
You must be signed in to change notification settings - Fork 0
Add tracker support #10
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
Conversation
@imsickofmaps please review |
}; | ||
return go.utils_project | ||
.log_quiz_answer(self.im, quiz_question, choice.value, choice.label, | ||
correct ? "True" : "False", response_text, self.im.user.answers.tracker) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should just pass correct
in directly. The JSON parser should handle it ok.
@@ -1255,7 +1255,7 @@ return [ | |||
"url": "http://localhost:8003/api/v1/tracker/cb245673-aa41-4302-ac47-t00000111111/", | |||
"data": { | |||
"complete": true, | |||
"completed_at": "2016-04-04T22:00:00.000Z" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry - what I meant was that it should include a timestamp that is not just "midnight UTC". You need a new go.utils.get_now()
that actually returns an accurate hour/min/sec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i added a get_now function to utils... not sure if we'd rather want it in utils_project..?
@imsickofmaps another review please |
👍 |
The backend uses the concept of a
tracker
now to keep answers grouped together. On start of a quiz session, it should be POSTed to with the identity uuid and the quiz: https://github.com/westerncapelabs/seed-continuous-learning/blob/develop/quizzes/tests.py#L255-L263In response you'll get a tracker UUID should you be provided with each answer log: https://github.com/westerncapelabs/seed-continuous-learning/blob/develop/quizzes/tests.py#L315-L326
Once completed, the tracker should be PATCHed to have a completed status: https://github.com/westerncapelabs/seed-continuous-learning/blob/develop/quizzes/tests.py#L291-L297