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

AICC - Incorrect logic in the AICC.PHP code for handling CMI judgement of passed/failed status based on mastery_score

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.5
    • Fix Version/s: 2.0
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      Moodle 1.8.5, XAMPP 1.6.6, Windows
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      In the AICC.PHP code there is logic to allow the CMI to judge lesson_status (passed/failed) if the course does not send these values but only sends completed. The logic is based on the CMI system been allowed by AICC guidelines to judge pass/fail IF it has a mastery_score set for the content.

      This issue only came about due to correctly fixing the logic for retrieving the mastery_score in AICC.PHP page see MDL-14485

      The logic in the page is flawed because of two reasons:
      1. It does not retrieve the SCO information.
      2. It does not correctly reference the datamodel element.

      The impact if you make the changes in MDL-14485 and do not fix this issue is that the CMI ALWAYS judges the course failed.

      if ($mode == 'normal') {
      //Martin Holden, SkillSoft
      //Corrected logic for LMS to determine passed/failed status
      //Failing previously as masteryscore should be mastery_score
      //Also there was no call to retrieve $sco
      //22nd April 2008
      //
      //if ($lessonstatus == 'completed') {
      // if (!empty($sco->masteryscore) && !empty($score) && ($score >= $sco->masteryscore))

      { // $lessonstatus = 'passed'; // }

      else

      { // $lessonstatus = 'failed'; // }

      // $id = scorm_insert_track($USER->id, $scorm->id, $sco->id, $attempt, 'cmi.core.lesson_status', $lessonstatus);
      //}

      if ($lessonstatus == 'completed') {
      if ($sco = scorm_get_sco($scoid)) {
      if (!empty($sco->mastery_score) && !empty($score) && ($score >= $sco->mastery_score))

      { $lessonstatus = 'passed'; }

      else

      { $lessonstatus = 'failed'; }

      $id = scorm_insert_track($USER->id, $scorm->id, $sco->id, $attempt, 'cmi.core.lesson_status', $lessonstatus);
      }
      }
      // END
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                piers Piers Harding
                Reporter:
                martin_holden@skillsoft.com Martin Holden
                Tester:
                Dan Marsden
                Participants:
                Component watchers:
                Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  24/Nov/10