Issue Details (XML | Word | Printable)

Key: MDL-19899
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Dan Marsden
Reporter: Martin Holden
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

SCORM Launch URL's been cut short

Created: 22/Jul/09 12:12 AM   Updated: 22/Jul/09 12:12 AM
Return to search
Component/s: SCORM
Affects Version/s: 1.9.5
Fix Version/s: None

Environment: MySQL 5.1., Ubuntu 9.04

Database: MySQL
Participants: Dan Marsden and Martin Holden
Security Level: None
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
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.


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.