-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.4.1
Bug description
Scorm ignore item with 0 score when calculating activity grade when set to "average grade".
How to reproduce the bug
- Create a scorm activity with a scorm file with 2 items with grading method set to "average grade".
- Get 0/100 at the first item and 50/100 at the second item.
- Check the scorm given by Moodle.
Expected result
The student should get 25/100.
Current result
The student get 50/100.
Possible origin of the bug ?
I am not sure (as I am not a scorm expert), but I am wondering if on this line :
https://github.com/moodle/moodle/blob/main/mod/scorm/locallib.php#L744
Shouldn't
$scorm->type
|
be replaced with
$sco->scormtype
|
(as this is what we see later in the code) ?
Other possible issue ?
This should be an other issue but I am putting this here as it's very related and it could save time : if a student answer to the first item but answer to the second item (and get 50/100), it also get 50/100 to the activity. I think it should count the first item as 0/100 and give him a 0/100.
Related issue
MDL-52941but it's been closed.