-
Notifications
You must be signed in to change notification settings - Fork 20
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
QuizAttempt check if question is answered correctly #28
Comments
Yeah, it's possible. Something like the following? {
"result": [
{
"question_id": 1,
"is_correct": false,
"score": -1,
"given_answer": 20,
"correct_answer": 10.5
},
{
"question_id": 2,
"is_correct": true,
"score": 5,
"given_answer": "123456",
"correct_answer": "123456"
}
]
} |
Yes, even better with more information. I just thought about true/false. However, the given/correct will be difficult for the multiple choice. |
|
@harishdurga: Sorry for checking so late, I was busy on other projects. I think this works in general, but noticed two things:
|
Hey @alex1897 , If you have some spare time can you please raise a PR fixing the mentioned problem? |
Hi @harishdurga, I already looked at the code and to be honest I can't solve the problem. |
Understood. No problem, I will try to solve this in sometime. |
Is it currently not possible to check after a question is answered if it's correct, right?
The leering effect is a lot better if the user knows on which question they made a mistake, instead of just telling them the points they made at the end.
I built myself a validation which seems to work (for single/multiple choice) but I guess there would a better way. Since the model already has the validation, could it provide a function to validate it?
Something like:
$quizAttempt->validate($quiz_question->id)
The text was updated successfully, but these errors were encountered: