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

External function tool_mobile_get_config is not formatting strings or texts

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1.2
    • 3.2
    • Web Services
    • MOODLE_31_STABLE
    • MOODLE_32_STABLE
    • MDL-56463-master
    • Hide
      1. Enable the multi-lang content filter to be applied to content and headers
      2. Add multi-lang tags to the site fullname, shortname and summary (description)
      3. Enable "Mobile services": Plugins ► Web Services ► Mobile
      4. Create a Token for one normal user:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      5. Next, you can do a CURL REST call simulating a WS client with the user.
        • You need to replace the wstoken, and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=tool_mobile_get_config&wstoken=ffbe3a3002f235bf9d01fd9369e10b66&section=frontpagesettings&moodlewssettingfilter=true' | python -m "json.tool"

      6. Check that you receive the fullname, shortname and summary fields correctly formatted (without the multi-lang tags)
      Show
      Enable the multi-lang content filter to be applied to content and headers Add multi-lang tags to the site fullname, shortname and summary (description) Enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for one normal user: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the user. You need to replace the wstoken, and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=tool_mobile_get_config&wstoken=ffbe3a3002f235bf9d01fd9369e10b66&section=frontpagesettings&moodlewssettingfilter=true' | python -m "json.tool" Check that you receive the fullname, shortname and summary fields correctly formatted (without the multi-lang tags)

    Description

      Notice that when reviewing the code, it should apply external_format_string and external_format_text in summary, fullname and shortname

      Attachments

        Issue Links

          Activity

            People

              jleyva Juan Leyva
              jleyva Juan Leyva
              Ankit Agarwal Ankit Agarwal
              David Monllaó David Monllaó
              Jake Dallimore Jake Dallimore
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5/Dec/16