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

Managing limit of 28 chars in Data Base

XMLWordPrintable

    • MOODLE_28_STABLE

      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

            Unassigned Unassigned
            juanurios Juan Urios
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.