How to determine quiz Time To Complete

Jump to solution
glparker
Community Champion

The Quiz_Submissions API has a value,

  // Amount of time spent, in seconds.  "time_spent": 300,
  • There are many quizzes started and abandoned that count as attempts left to time out, and no way to distinguish these from attempts that took the entire time but failed.
  • There are different versions of the quiz indicated by quiz_version in the returned data (this is not documented behavior)  (different from attempt number, which is documented)

  

I was wondering if you had any ideas on how I might be able to capture the time to complete the exam more completely, to filter out completions from abandonments, to pick apart the multiple versions of a quiz.

0 Likes
1 Solution
James
Community Champion

 @glparker ,

In one of my classes, I use the average of all my quiz attempts. At the end of the semester, I go through and look for quizzes that were started (presumably on accident) but never attempted and ended with a score of 0 because time ran out. Because this is a problem to do by hand, I wrote a program to do it.

For each of the quizzes, I start off with with the quiz_submissions. If the attempt > 1, then I attempt to fetch all of the previous extra attempts by calling quiz_submissions with id and attempt set. I use a simple for loop with the index starting at 1 and going up to the number of attempts - 1 to get the additional ones.

I then iterate through all of the submissions, looking for end_atfinished_at. That will give you the people who had it autosubmitted because time ran out. Because I only want to exclude the false attempts, while still giving them a 0 if it's their only attempt, I also filter on score = 0 and attempt > 1.

View solution in original post