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

Increase course fullname and shortname beyond 254/255 characters



    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.9.3, 3.10, 3.11, 4.0
    • None
    • Backup, Course, MNet


      Issue Description

      When creating multi-language Moodle sites with more than just a few languages, the current 254/255 character limit is not enough. This is barely enough for sites with 2 languages where you are left with about 82 characters per language after you included the 2 sets of opening and closing HTML SPAN multilang tag wrappers at 42-45 characters each.

      What is needed is to remove or significantly expand the current character limit for fields with a 254/255 character limit in order to be able to support more languages in a course name.

      Why this is needed

      Let's say I want to create Moodle site where individual course are available in 3 languages. This is often desirable over having multiple single language courses because it allows you to switch language at any point during the course.

      That would limit you to 84 characters per language. However, after factoring in the SPAN multilang tags (about 45 characters per language), you are actually left with an average of just 39 characters for the course fullname and shortname which is pretty tight.

      To support 4 languages is not reasonable leaving you with just 18-20 characters per language for course names. 5 languages and up is not feasible (5 characters or less per course name).

      Other fields in Moodle are also too short

      This field size limitation does not only affect course fullname and shortname fields. There are other fields in blocks, activities, etc. which could also benefit from overcoming the 254 character limitation. However, I propose that these be identified and dealt with individually in order to keep development and testing manageable.

      Unfortunately it is not likely to be enough to just modify the course edit form and expand the size of the field in the database. The scope of such modifications are likely to also impact course backup/restore, course request, mnet and more.

      Moodle v4.0 might be a good time to improve Moodle support for multi-languages.


      It is possible to squeeze an extra language in using the 3rd party Multi-Language Content (v2) filter instead of the Multi-Language Content filter which comes bundled with Moodle. Its {mlang} tags require a little less than half the space of the SPAN tags but that still won't be enough if you are trying to get 9 languages going on your site.

      Alternatively, at least in the case of a course full name, you could use a custom course field and refer to it filters like FilterCodes.


      You can find some past discussion surrounding this issue in the following forum thread:




            Unassigned Unassigned
            michael-milette Michael Milette
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
            14 Vote for this issue
            14 Start watching this issue