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

external_format_text should be safe to call from web or webservice

    XMLWordPrintable

    Details

    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-51213-master

      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

              Assignee:
              damyon Damyon Wiese
              Reporter:
              damyon Damyon Wiese
              Peer reviewer:
              Marina Glancy Marina Glancy
              Integrator:
              David Monllaó David Monllaó
              Tester:
              Frédéric Massart Frédéric Massart
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                16/Nov/15