@mirzakhalov
What you are saying is consistent with what I found: "That means that you're not going to be able to get the questions as the student using that API call."
The correct responses are delivered as part of the HTML with the page, not through the API. That means that you would need to parse the DOM on the page and find the answers if you want to get them that way. I don't recommend that, but if you're doing it as a student, that may be your only recourse.
As far as workarounds, I have to admit that I'm not understanding what you're trying to do (or perhaps why you're trying to do it this way). Sometimes not understanding the whole picture makes it difficult to provide solutions.
It seems that you want to
- take the correct answers / feedback for the questions and make Quizlet flash cards from it. The cards do not consist of the student answers, but the correct answers from Canvas, and
- only allow students who have completed the quiz to see the Quizlet cards.
If #1 is correct, then it seems like you would be making one Quizlet for the entire class, not individual Quizlets for students. Is that even possible -- to create a Quizlet as someone else so that only they see it?
If #1 is correct, then you wouldn't need to use the student token, you would want to use a token of someone who has the ability to see the correct responses -- the teacher, instructional designer, administrator, etc. That token will have permission to the view responses (provided they don't come from linked question banks).
#2 is easy to determine from the Canvas side, but I'm not sure how you're going to enforce it from the Quizlet side. I will admit that I have limited experience with Quizlet, just having used the web interface. I don't anything about their API and Google searches for Quizlet API documentation are not helpful. You can share a Quizlet by email but there is no guarantee that a student won't then share it with other students. This is true whether you create it for the student or you create it as the instructor and then share it.
Since preventing sharing completely isn't feasible, you would not generally want to make a Quizlet out of a high-stakes assessment such as a test. The data will be out there for the next time the course content is used and it will appear on sites where students try to be helpful by posting answers from their courses for the rest of the world to see.
That makes it seem like something that the instructor would want to create and then share with students. If they need to complete the quiz first, then I can think of several ways to make that happen.
- Use module requirements. They often don't provide the flexibility that you need or might be used in another way, so as much as this is "the official way", it's often not helpful.
- Use submission comments. Once a student has completed the quiz, send a comment with a link to the Quizlet.
- Use an LTI that scans which assignments have been completed and then provides links to any Quizlets the student has permission to view.
- Wait until the assignment has closed and then add the review to a Quizlet classroom. This allows students who don't complete the quiz to still see the review, which is a problem that exists now (people want to extend the show correct answers date to allow students to for review for the final, but students cannot see them to review if they didn't take it when it was open).
- Let students view the answers to the quiz more than once and for an indefinite amount of time. This not the same as a flashcard, but it would allow them to review.
As an instructor, any of those would work for me except (a). (b) would be the easiest for me to do because I rarely use Quizlet in the classroom. If I used a lot of Quizlet, then (d) would be easiest. (e) doesn't involve Quizlet, so I might steer away from it. (c) requires programming skills, which I have but wouldn't use for this. I realize that once I make the answers available, then students will share. That's part of why I try to make sure that my questions come from question groups with more questions than used on the quiz.
As an instructor, I would absolutely want control over whether this happened. I would not want someone coming along automatically and adding this just because I make the answers available. I would want to control which quizzes this happened for. That means that it should be driven from the instructor side, with the instructor creating the Quizlets, not the students. I realize that if students want to create the Quizlet, there's nothing I can do to stop them if I show the answers.