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

mod_scorm: Fix incorrect result calculation when Max Grade is adjusted

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Steps to replicate: (ex: Max grade = 10) 
      1. Log in to Moodle 
      2. Access a Course 
      3. Add in a SCORM activity 
      4. Edit a SCORM activity settings (Edit setting)
      5. Under 'Grade', change 'Maximum grade' to 10 
      6. Click Save and display 
      7. Complete Activity with 3/3 questions correct 
      8. (note in the entry page, the 'grade for attempt' is 1000%) 
      8.1 With the fix the presentation should show the correct calculated score out of designated Max Grade [Screenshot]

      Show
      Steps to replicate: (ex: Max grade = 10)  1. Log in to Moodle  2. Access a Course  3. Add in a SCORM activity  4. Edit a SCORM activity settings (Edit setting) 5. Under 'Grade', change 'Maximum grade' to 10  6. Click Save and display  7. Complete Activity with 3/3 questions correct  8. (note in the entry page, the 'grade for attempt' is 1000%)  8.1 With the fix the presentation should show the correct calculated score out of designated Max Grade [Screenshot]
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_33_STABLE

      Description

      • Main points:
      1. SCORM Package calculates result incorrectly when Max Grade is adjusted and when the Max Grade is set different value rather than 100 in Grade section of Scorm module edit setting. [Screenshots]
        (Similar issue for calculated grade does occur for any deviation of 100 as a Max Grade value and any number of correct answers in an attempt)
      2. Another issue is the presentation of the grade which is in percentage (%) rather than a number as a representation of the outcome result (grade) "out of" the designated Max Grade. [Screenshots]
      • Additional info: 
        Upon Changing the 'maximum grade' of the SCORM activity to 10 (or any other value rather than the default 100), completion of the activity with 3/3 questions correct gives a 'Grade reported' of 1000%.
        For 2/3 correct answers, it shows '670%' . The actual recorded grade for the activity in the gradebook is 10 (as intended). This issue was also replicated in production Moodle.
      • Changes in:
        mod/scrom/locallib.php

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ayeganeh Atbin Yeganeh
                Participants:
                Component watchers:
                Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: