Error Api Learning Paths scorm
Current behavior / Resultado actual / Résultat actuel
At the end of the scorm exercise chamilo set progress 100% independently of the result.
Expected behavior / Resultado esperado / Résultat attendu
The progress value should remain 0% if the students has failed
Steps to reproduce / Pasos para reproducir / Étapes pour reproduire
- Create course and Set up a new learning path by importing a SCORM
- Assign Student to the course
- Login as Student
- Courses > Learning paths > click on the activity
Chamilo Version / Versión de Chamilo / Version de Chamilo
1.11.x





@hi-rafa it is very likely the issue here is the SCORM content. It has to return a status of "success" or "completed" specifically. Obtaining 100% is not enough, as per rules of the SCORM 1.2 Runtime Environment.
Hi @ywarnier, Sorry but I am almost 100% sure that the problem is the API of chamilo. We have another LMS and the same SCORM package works correctly. I found out that Chamilo doesn't updated the status after the first activity attempt. Example The student does the activity for first time but he fails so the status is saved as Failed. The second time the student does the activity and he Pass/Complete but chamilo api does save the result.
Do you have the SCORM 1.2 RTE document around? The code in Chamilo usually matches very closely what SCORM requires, which is sometimes very weird. I'm not saying Chamilo is perfect, but the learning path code and the SCORM related code are the most complex in Chamilo, so I'm not too happy about checking it again (it literally takes hours, as you might have seen by yourself).
Hi @ywarnier I can't send you the SCORM package 1.2 because of privacy content, but I have been told that this error occurs with any other SCORM package 1.2. I am very aware of the complexity of SCORM API, I have spent already more than 16h trying to fix this bug.
Please try this User case scenario on your own and let me know.
- The student does the activity in "Learning path"
- The student failed/suspend the activity
- The student does for second time the activity
- The student pass/complete the activity successfully
Our client use this following tool to build their SCORM packages: Articulate Storyline
My chamilo user case TEST:








@hi-rafa this was not my question. My question was whether you have actually gone through the RTE for SCORM 1.2. Feel free to download it from here: https://drive.google.com/open?id=0B7wXPLicqnqXcUxPcGJTWjRDejg I'm asking because I understand the current rules might be frustrating, but there are very specific rules in SCORM 1.2 that might feel buggy but that are actually rules so if you go around them, other processes will fail to comply with SCORM 1.2. And I'm not saying this is not a bug. I'm just a bit cautious about spending hours reviewing the SCORM rules to finally get to nothing because it would infringe the SCORM rules.
But yes, your report looks like a bug at first glance.
@ywarnier I will try to find another SCORM Package and try again I will also read in deep the rules for SCORM 1.2 you sent me.
There's a section about status in the code (lp_ajax_save_item.php I think) that makes a series of references to the SCORM 1.2 RTE to explain why decisions are taken this way. Maybe that will help.
Hi @ywarnier, I would like to know if you received the email I sent you about this problem? The fact that the student can only complete once the course, independently of his result (Failed or passed) its a very important matter for us, please let us know if Chamilo is planing to do something about it or not. Thank you.
We also found another problem and is that the time spent in the course doesnt sum up. Each time the student does a course attempt it resets the time spent.
Hi @hi-rafa, Yes, I received it. I haven't been able to work on that yet, sorry (too much work coordinating the release and attending customers). I will get back to you on this before the 1.11.4 release.
About the other problem that the time spent in the course doesnt sum up.
There is a global parameter to define this:
Cumulative session time for SCORM Yes
NoWhen enabled, the session time for SCORM learning paths will be cumulative, otherwise, it will only be counted from the last update time. This is a global setting. It is used when creating a new learning path but can then be redefined for each learning path.
Hi @NicoDucou I am aware of this option and when I did the test it was enabled.

Hi @ywarnier , @NicoDucou
Good news!!! is not a bug, after hours of debugging I found out that there is a main variable that controls if the student can repeat the course or not. If the SCORM doesn't have a limit of attempts Chamilo logic is to limit the students to only one attempt.

Hi @hi-rafa Great. Does this close the entire issue then, or is there still something pending (like the cumulative time)?
@ywarnier, Yes the cumulative time works now. There is one thing left that we think that it should be change. The progress bar shouldn't be 100% when the course is failed, specially if you can repeat it. What do you think?
@hi-rafa I agree that the item should not be considered a "success" if the item is failed. However, this has to be balanced with all the other rules of SCORM, so if you want to change it, be very careful about it :-) I'm removing the 1.11.4 milestone though. Not really a critical issue anymore, and I'd like to publish 1.11.4 soon (it already has about 1000 commits since 1.11.2)
Please open a new issue for the "success" behaviour fix.