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
    • MOODLE_404_STABLE
    • MDL-82703-403_scorm_averagegrade
    • MDL-82703-404_scorm_averagegrade
    • Hide
      • Create a scorm activity with the scorm in attachment.
      • In the activity settings, set Grade > Grading method to "Average grade".
      • Start an attempt, the first item should be opened automatically and you should get a 50/100 score. Open the second item and you should get a 0/100 score.
      • Go in reports and check that the score of your attempt is 25/100.
      • Start an other attempt (check the checkbox), and only open the first item (which is opened automatically). Don't open the second item.
      • Go in reports and check that the score of the second attempt is 25/100.
      Show
      Create a scorm activity with the scorm in attachment. In the activity settings, set Grade > Grading method to "Average grade". Start an attempt, the first item should be opened automatically and you should get a 50/100 score. Open the second item and you should get a 0/100 score. Go in reports and check that the score of your attempt is 25/100. Start an other attempt (check the checkbox), and only open the first item (which is opened automatically). Don't open the second item. Go in reports and check that the score of the second attempt is 25/100.

      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.

       

            Unassigned Unassigned
            degrangem DegrangeM
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

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