Open dave-doty opened 5 months ago
Ah, I think I figured out the problem. I accidentally neglected to include this detail, but the question is part of a Question Group. I see that the associated QuizGroup
object has a field question_points
, which has the correct value of 20.0.
I'm not sure if it's a bug that the Question
object itself has the field points_possible
with the wrong value. It seems as though it should have the same value as question_points
in the group it is a part of.
Summary:
The
points_possible
field of QuizQuestion is incorrect. (when part of a QuizGroup; see comment below) In my case the question is worth 20 points, butpoints_possible
is 1.Steps to reproduce:
I discovered this through the canvasapi Python package. However, this appears to be a bug in the Canvas API itself, not the Python package. In debugging I checked the underlying response JSON from the GET request that canvasapi executes (https://canvas.instructure.com/doc/api/quiz_questions.html#method.quizzes/quiz_questions.show, https://github.com/ucfopen/canvasapi/blob/02d42cba3b0fd22e780ac0a5e904ea84fbc0b58d/canvasapi/quiz.py#L244) and see that the JSON field
points_possible
is 1 for a question, even though I assigned that question to be 20 points.pip install canvasapi
.Expected behavior:
It should print 20.
Actual behavior:
It prints 1. (or sometimes 0... I couldn't tell the pattern here, but I tried this a few times and it was always 1 or 0 for every question on every quiz)
Additional notes:
I would directly share my Sandbox course where I'm seeing this happen (https://canvas.ucdavis.edu/courses/166766) so you could skip some of these steps, but I don't know how to grant a private access token only to that Sandbox course, without also giving it permission to access my real courses.
I could not figure out how to determine the
question_id
from the Canvas webpage (it doesn't show up in a URL the way the course ID and the quiz ID do); in my case I am processing a list ofQuizSubmission
objects namedsubmission
, and I use the fieldsubmission.question_id
to determine the question ID. So you may have to do something like that in order to determine the question ID for the question you added in Step 2.