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

SCORM External AICC Type doesn't work at all in 2.6 and 2.7 versions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.4, 2.7.1
    • Fix Version/s: 2.6.5, 2.7.2
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide

      MAKE SURE YOUR SERVER ALLOWS OUTGOING HTTP AND YOUR SITE USES A PUBLIC URL (not localhost or 192.168.x.x etc)

      go to admin > plugins > activity modules > SCORM
      make sure the setting "Enable direct AICC url" is set to "yes"
      make sure the setting "Enable external AICC HACP" is set to "yes"

      Test 1
      Create a new SCORM in your site - select the scormtype "external AICC URL" and use the following url:
      https://secure.testcraft.com/dev7/Assess.aspx?aid=MOODLE-AICC-01&apass=PASSWORD123
      Enter the course and make sure it works.

      Test 2
      Create a new SCORM in your site - select the scormtype "Uploaded package" and add the AICC Zip package attached to this bug "OLSA_AICC_FULLTESTCONTENT_HTTP.zip"
      Enter the course and make sure it works.

      Show
      MAKE SURE YOUR SERVER ALLOWS OUTGOING HTTP AND YOUR SITE USES A PUBLIC URL (not localhost or 192.168.x.x etc) go to admin > plugins > activity modules > SCORM make sure the setting "Enable direct AICC url" is set to "yes" make sure the setting "Enable external AICC HACP" is set to "yes" Test 1 Create a new SCORM in your site - select the scormtype "external AICC URL" and use the following url: https://secure.testcraft.com/dev7/Assess.aspx?aid=MOODLE-AICC-01&apass=PASSWORD123 Enter the course and make sure it works. Test 2 Create a new SCORM in your site - select the scormtype "Uploaded package" and add the AICC Zip package attached to this bug "OLSA_AICC_FULLTESTCONTENT_HTTP.zip" Enter the course and make sure it works.
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull Master Branch:
      master_MDL-46639

      Description

      There seems to be a serious bug in the SCORM External AICC code which means you can't connect to external SCORM courses from the latest versions of Moodle 2.6 and 2.7 (at time of writing this is 2.6.4 and 2.7.1).

      I believe the errors are in /mod/scorm/module.js and /mod/scorm/locallib.php

      In module.js, line approx 746...

      if (tree.rootNode.children[0].title !== scoes_nav[launch_sco].url) {
                  var node = tree.getNodeByAttribute('title', scoes_nav[launch_sco].url);
                  if (node !== null) {
                      scorm_first_url = node;
                  }
      } else {
                  scorm_first_url = tree.rootNode.children[0];
      }
      

      … should be…

      if (tree.rootNode.children.length > 0) {
            if (tree.rootNode.children[0].title !== scoes_nav[launch_sco].url) {
                       var node = tree.getNodeByAttribute('title', scoes_nav[launch_sco].url);
                        if (node !== null) {
                               scorm_first_url = node;
             }
             } else {
                        scorm_first_url = tree.rootNode.children[0];
             }
      }
      

      In locallib.php approx line 304-ish...

      } else if ($scorm->scormtype === SCORM_TYPE_AICCURL  and $cfg_scorm->allowtypeexternalaicc) {
              require_once("$CFG->dirroot/mod/scorm/datamodels/aicclib.php");
              // AICC
              if (!scorm_parse_aicc($scorm)) {
                  $scorm->version = 'ERROR';
              }
              $scorm->version = 'AICC';
      

      … should, I think, look like…

      } else if ($scorm->scormtype === SCORM_TYPE_AICCURL  and $cfg_scorm->allowtypeexternalaicc) {
              require_once("$CFG->dirroot/mod/scorm/datamodels/aicclib.php");
              // AICC
              $result = scorm_parse_aicc($scorm); 
              if (!$result) {
                  $scorm->version = 'ERROR';
              } else {
                 $scorm->launch = $result;
              }
              $scorm->version = 'AICC';
      

      Please do let me know if there is any more information you need.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  3 Vote for this issue
                  Watchers:
                  11 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    8/Sep/14