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

external_format_text should be safe to call from web or webservice

XMLWordPrintable

    • 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.

      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.

            damyon Damyon Wiese
            damyon Damyon Wiese
            Marina Glancy Marina Glancy
            David Monllaó David Monllaó
            Frédéric Massart Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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