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

Unable to update SCORM activity with External AICC URL

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2, 2.3
    • Fix Version/s: 2.2.2
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide

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

      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

      Hit Save and return to course - it doesn't matter if the SCORM/AICC actually loads or not in your player, it definitely won't if your site isn't publicly accessible - but ignore this as it isn't relevant to this test.

      Update the SCORM activity, check to make sure the URL entered above is still there.
      Save and return to course'

      Update the SCORM activity again, check to make sure the URL is still there after update.

      Show
      go to admin > plugins > activity modules > SCORM make sure the setting "Enable direct AICC url" is set to "yes" 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 Hit Save and return to course - it doesn't matter if the SCORM/AICC actually loads or not in your player, it definitely won't if your site isn't publicly accessible - but ignore this as it isn't relevant to this test. Update the SCORM activity, check to make sure the URL entered above is still there. Save and return to course' Update the SCORM activity again, check to make sure the URL is still there after update.
    • Workaround:
      Hide

      I found 2 places where the new SCORM_TYPE_AICCURL scormtype was missing.

      In mod_form.php in the function set_data($default_values):
      from line 396 SCORM_TYPE_AICCURL should be added to the switch statement (this fixes the empty URL field):
      switch ($default_values['scormtype'])

      { case SCORM_TYPE_LOCALSYNC : case SCORM_TYPE_EXTERNAL: case SCORM_TYPE_IMSREPOSITORY: case SCORM_TYPE_AICCURL: <== fix for empty URL field $default_values['packageurl'] = $default_values['reference']; }

      In lib.php in the function scorm_update_instance($scorm, $mform=null):
      an extra else if needs to be added (like in the function scorm_add_instance). This fixes the update error.
      } else if ($scorm->scormtype === SCORM_TYPE_AICCURL) {
      $scorm->reference = $scorm->packageurl;

      Show
      I found 2 places where the new SCORM_TYPE_AICCURL scormtype was missing. In mod_form.php in the function set_data($default_values): from line 396 SCORM_TYPE_AICCURL should be added to the switch statement (this fixes the empty URL field): switch ($default_values ['scormtype'] ) { case SCORM_TYPE_LOCALSYNC : case SCORM_TYPE_EXTERNAL: case SCORM_TYPE_IMSREPOSITORY: case SCORM_TYPE_AICCURL: <== fix for empty URL field $default_values['packageurl'] = $default_values['reference']; } In lib.php in the function scorm_update_instance($scorm, $mform=null): an extra else if needs to be added (like in the function scorm_add_instance). This fixes the update error. } else if ($scorm->scormtype === SCORM_TYPE_AICCURL) { $scorm->reference = $scorm->packageurl;
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull Master Branch:
      master_MDL-31039

      Description

      When trying to update a SCORM activity with an External AICC URL the URL input field is empty.
      Saving the form returns "ERROR: Could not update scorm" and the URL is not updated.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Mar/12