- Issue created by @rhankins
- π¬π§United Kingdom globexplorer
In version 1.x only the first reached status get's written into the db. Some invalid scorms will not supply any status. In order to set the status correctly the below code makes sure of that. Only if the $status varialbe has the correct value it will write the status.
if ($status == 'passed' || $status == 'completed') { $entity->setStatus($status); }
Normally the raw scorm will be 0 per default, and a number if score already received.
I think what you describe here can be related to 2 things:
1. Problem with scorm itself.
2. You try to make a second attempt, in version 1.0 once an attempt has been made it will not be updated. - πΊπΈUnited States rhankins
@globexplorer, thanks for your reply. You said "In order to set the status correctly the below code makes sure of that." But the code you quoted is my attempt at a patch, not what is in the module code base currently.
So, I'm attaching my patch for consideration of incorporating it into the module.
This solves the issue I experienced where a raw score comes in at 100, prior to status being set (as passed or completed). This prevents the scenario where the status is stuck at incomplete even though they passed the quiz.
Thanks for your consideration.
- πΊπΈUnited States rhankins
Sorry, I saw an error with my patch file. Reuploading.