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

SCORM Launch URL's been cut short

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.5
    • Fix Version/s: 2.0
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      MySQL 5.1., Ubuntu 9.04
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      I have identified an issue due to the size of the database field used to store the HREF value for a SCORM SCO.

      In my test case the launchurl in the IMSMANIFEST.XML for my course was 272 characters, and was getting truncated when Moodle parsed and stored this.

      This is due to the field "launch" in mdl_scorm_scoes been defined as varchar(255)

      The XSD definitions (imscp_rootv1p1p2.xsd) define that this attribute can be up to 2000 characters:

      <xsd:attributeGroup name="attr.href">
      <xsd:attribute name="href" use="optional">
      <xsd:simpleType>
      <xsd:restriction base="xsd:anyURI">
      <xsd:maxLength value="2000"/>
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:attribute>
      </xsd:attributeGroup>

      The fix is to change the table definition to be varchar(2000) if using MySQL 5.03 or later, earlier versions only allow a max field size of 255:

      "Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in 5.0.3 and later versions. The effective maximum length of a VARCHAR in MySQL 5.0.3 and later is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used. "
      Copied from http://dev.mysql.com/doc/refman/5.0/en/char.html

      Alternative that may work prior to MySQL 5.03 is to convert field to TEXT but have not tested.

        Attachments

          Activity

            People

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

              Dates

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