Skip to content

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

Merged
merged 7 commits into from
May 3, 2016
Merged

Conversation

NicolaasDieBaas
Copy link
Contributor

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-L263

In 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

@NicolaasDieBaas
Copy link
Contributor

@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)
Copy link
Member

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"
Copy link
Member

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

Copy link
Contributor Author

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..?

@NicolaasDieBaas
Copy link
Contributor

@imsickofmaps another review please

@imsickofmaps
Copy link
Member Author

👍

@NicolaasDieBaas NicolaasDieBaas merged commit 0a03987 into develop May 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants