Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
I am developing an application to view user course data.
I am currently working on implementing Quizzes, which I've decided to implement as a subset of Assignments. Think a superclass "Assignable" with superclass "Submittable"
I've noticed that using the `assignments?include=submissions' endpoint returns Submissions as an Array/List. But using `quizzes/{ID}/submissions` returns submission as a Dictionary. https://canvas.instructure.com/doc/api/quiz_submissions.html
Is there a particular reason why this decision was made? Or is there a better way to gather QuizSubmissions? Otherwise, this disrupts my implementation logic. Essentially, I want to know how many active submissions to make a decision in whether or not to offer to start the quiz or resume the quiz.
I ended up just representing it as [String : [QuizSubmission]] and flattening to just [QuizSubmission] in my data client. But this still doesn't explain the perceived inconsistency in getting this data.
If you want to know whether or not to offer to start or resume a quiz, you can use the workflow_state of the quizSubmission object. I believe there can only be one "active" (not "complete") quizSubmission at a time.
To participate in the Instructure Community, you need to sign up or log in:
Sign In