I have proctored exams in my system and am sourcing the problems from a randomized library content block. Now I want the block IDs of the problem shown to the user in one attempt. Can anyone tell me where I can find that data?
I thought I could get it from StudentModule or ProctoredExamStudentAttempt but couldn’t figure out how. I could get some data using student_module.all_submitted_problems_read_only(student_module.course_id) but the problem with that is that it returns data from all the attempts and there’s no way to tell which submission was from which attempt. I am only concerned about the latest attempt if that simplifies the process.
This will give you the IDs of the problems shown to that particular user. Randomized library content blocks have no concept of “attempts” so the IDs are always the same regardless of how many times the user submits answers to the problems shown. The individual problems may allow multiple attempts but the problems themselves don’t change once randomly assigned.
As you can see, here is the first problem shown to me, which has ID block-v1:Axim+Demo_1+Demo_1_1+type@problem+block@0895f1b6c0b329e50b90. (This is the long form of the ID which is shortened to ["problem", "0895f1b6c0b329e50b90"] in the randomized content block’s student module.)
and here is its corresponding student module data showing which answer I selected (“choice_1”, the second choice - zero is first), how many attempts I made, and what my score is: