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

Avoid caching language strings and formatted strings in modinfo

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.3
    • None
    • Caching, Course
    • None
    • MOODLE_33_STABLE

    Description

      In MDL-41809 the bug was fixed when $PAGE->context was not available during course cache building, calling format_string() resulted in debugging messages.

      The bigger problem is that course cache may contain strings that were processed through filters or taken from language packs. It is not guaranteed that during the display of these strings the same filters or the same language is used.

      Possible solution is to make class lang_string cacheable and implement similar cacheable class for formatted string/text and use new lang_string() instead of get_string() and this new class instead of format_string/format_text

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              marina Marina Glancy
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Raquel Ortega, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: