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

Hotfix/view valid answer #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aprooks
Copy link
Contributor

@aprooks aprooks commented Mar 29, 2014

valid answer should be returned by Api , because it is needed at editProblem form

@@ -70,7 +70,7 @@ exports.getById = function(id) {
return problem.questionsRef.indexOf(question.id) > -1;
})
.map(function(question) {
return _.pick(question, ['id', 'title', 'options', 'answered', 'isCorrect']);
return _.pick(question, ['id', 'title', 'options', 'answered', 'isCorrect','validAnswer']);
Copy link
Contributor

Choose a reason for hiding this comment

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

Somehow we need to get the valid answer so that an admin can edit it... however should we filter it out if the request is from a student? or should we let the student cheat?

@aprooks
Copy link
Contributor Author

aprooks commented Mar 30, 2014

With current API design we have to choose one of the following, if we want a proper problems edititing:

  1. Filter api response based on roles
  2. Let user "cheat", and continue project as a fast prototype.

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