Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-82703

Scorm score not calculated (with average grade) correctly when student get 0 in one of the items

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.4.1
    • SCORM

      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

      1. MDL-52941 but it's been closed.

       

            degrangem DegrangeM
            degrangem DegrangeM
            Andrew Gosali Andrew Gosali
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 45 minutes
                1h 45m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.