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

external_format_text should be safe to call from web or webservice

    XMLWordPrintable

Details

    • MOODLE_30_STABLE
    • MOODLE_30_STABLE
    • MDL-51213-master
    • Hide

      Carefully review the code, run the unit tests. This is a low level API change and will not affect existing code - because it is all wrong. New code written correctly will make use of this.

      Show
      Carefully review the code, run the unit tests. This is a low level API change and will not affect existing code - because it is all wrong. New code written correctly will make use of this.

    Description

      Or anywhere really.

      The problem is that we want to write re-usable renderables - that can export their data for returning to a web-service - or rendering in the page.

      This means that they either:
      a) have to know if they are being called for webservice and call the correct format_text/external_format_text function
      b) always should call external_format_text and it should do the correct thing.

      B is sensible - A is not.

      The problem with B at the moment - is that external_format_text by default does not apply any filters (it should match the default for format_text).

      Another problem is that we do not have a matching function external_format_string for names etc.

      Attachments

        Issue Links

          Activity

            People

              damyon Damyon Wiese
              damyon Damyon Wiese
              Marina Glancy Marina Glancy
              David Monllaó David Monllaó
              Frédéric Massart Frédéric Massart
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Juan Leyva, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                16/Nov/15