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

Managing limit of 28 chars in Data Base

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_28_STABLE

      Description

      Hello
      Detected Moodle 2.8.6+

      When we upload (or create) a new theme and we named > 28 chars (8 + 20 chars + suffix and prefix chars) there are a bug:

      name is too long. Limit is 28 chars

      • The solution is a little change in moodle/lib/xmldb/xmldb.xsd. You should change line 13
        and rewrite

         <xs:pattern value='[0-9a-z_]{1,X}'/> 


        X = number of characters accepted

      • and moodle/lib/xmldb/xmldb_table.php. You should change line 47
        and rewrite

         const NAME_MAX_LENGTH = X; 


        X = number of characters accepted

      In my development I have written X = 50, for example:

      <xs:pattern value='[0-9a-z_]{1,50}'/>
      const NAME_MAX_LENGTH = 50;
      

      And it's ok!

      In my opinion, may be, this parameter "X" It could be controlled through Moodle administration or be expanded.
      I request the development for this parameter to be controlled through the administration panel in future versions.

      Thanks

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              juanurios Juan Urios
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Bas Brands
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: