You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$event->objectid is coming in with 417 for quiz_attempts. However, question_attempts does not have 417. The record is not found and hence no data is being pulled from the record. Some how this is still working unless you have a boat load of attempts. Not sure how it's still working, unless there is an additional lookup deeper for each question and that just so happens to still work with smaller attempt numbers. However, on bigger sites this breaks.
get more quiz attempts then question attempts. Should break the attempt submitted.
Expected behaviour
should pull up the questions for that attempt.
Actual behaviour
nothing is returned for question attempts which means nothing is being sent to the LRS.
Additional information
Since I have to fix this any way, I will try and submit the fix with my question submitted fix. Not sure how this broke, it was working before on the server with a bunch of attempts. I will check file history to see what has changed.
The text was updated successfully, but these errors were encountered:
SELECT qa.*, qat.questionid FROM moodle.mdl_quiz_attempts as qa
join mdl_question_usages as qu on qu.id = qa.uniqueid
join mdl_question_attempts as qat on qat.questionusageid = qu.id where qa.id = {attemptID};
This returns all 15 quiz questions. About to test now.
That pretty much was the fix, including these items. $attempt = $repo->read_record('quiz_attempts', array('uniqueid' => $questionattempt->questionusageid)); the quiz_attempts are being sent incorrect ids. I didn't notice this until I started to get super high in attempts for one quiz. Not sure how we haven't had a problem yet. I also had to put back $DB->get_records_sql() so I could pull the complex sql command.
Description
Version
Steps to reproduce the bug
Expected behaviour
Actual behaviour
Additional information
The text was updated successfully, but these errors were encountered: