Quiz API for a timed quiz not marking the submission as 'Complete'
Summary:
I have a timed quiz with time limit as 5 mins. I create a submission for this quiz using the API. After 5 mins I hit 'mark quiz as complete api'. It returns with a 'bad request' error stating 'quiz submission is already complete'. When I hit the 'get all quiz submissions api', it returns the same submission with workflow_state as untaken. Upon hitting the 'get all quiz submissions api' again for the second time, I get the updated state for the quiz submission.
Steps to reproduce:
- Create a quiz with some time limit.
- After the time for the quiz has expired, hit the 'complete quiz' api.
- Hit 'get all quiz submissions api'
- Hit the above api again.
Expected behavior:
When the time expires for a quiz, the submission should get completed automatically and the api response should show the updated state of the submission.
Additional notes:
I checked the QuizSubmissions table in the database. The submission is not getting completed until the first 'get all submissions' request.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.