@Mattias_
The low-tech way I do it is to go to SpeedGrader and look at the student's quiz to see which question they got.
To automate the process, it depends on how you created the quizzes.
Are the questions linked to a question bank or are the questions included as part of the quiz by finding them in the bank and adding them to the quiz?
Question banks are difficult to work with and difficult to extract information from, so including the question in the quiz itself makes it easier to get the information that you want.
If the questions are included in the quiz, then you can generate the student analysis from the quiz statistics screen: Once I publish a quiz, what kinds of quiz statistics are available?
The top of each column contains a code, colon, and the text of the question. The code is the question ID that is an unique identifier for each version of the question.
That question ID can also be used with the Canvas API to fetch information about the question.
If you're finding the questions in the bank and importing them into the quiz, then you could use the Canvas API to do everything without messing with the CSV file that you get from the student analysis.
If you linked to a bank instead of including the questions in the exam, then the only way (that I remember) to extract the information is to download the assignment submissions and tell it to include[]=submission_history. When you do that, there is a property called submission_data for quizzes that contains the question ID for questions that are part of a bank. They do not include the text of the question, though, and there's no API for querying the question banks like there is quizzes, so you will still need to find the IDs some other way.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.