Moodle

URL resources have a maximum of 255 chars

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.5, 2.0
  • Fix Version/s: 2.0
  • Component/s: Resource
  • Labels:
    None
  • Database:
    Any
  • Affected Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

In both 1.9 and HEAD, the resource module's "reference" property is type VARCHAR(255). This is suitable for referencing local file paths, but some legitimate URLs can be well above 255 chars. I suggest the 'reference' field be increased to allow for large URLs, eg. 1000 chars.

When entering a URL longer than 255 chars, MySQL will silently truncate the URL, however other databases like Postgres, Oracle will error.

Activity

Hide
Dan Poltawski added a comment -

Hi Ashley,

With the conversion fo the resource module into seperate types, the url module now has a datatype of text which puts pratically no limits on the url length:

http://docs.moodle.org/en/Development:XMLDB_column_types

So this is fixed

Show
Dan Poltawski added a comment - Hi Ashley, With the conversion fo the resource module into seperate types, the url module now has a datatype of text which puts pratically no limits on the url length: http://docs.moodle.org/en/Development:XMLDB_column_types So this is fixed

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: