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

Section summary text is cleaned in WS get_course_contents

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1
    • 3.0.5, 3.1.1
    • Web Services
    • MOODLE_31_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-55019-master
    • Hide
      1. Create a course, edit a section and in the summary add HTML code including an iframe pointing to any url (youtube for example)
      2. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      3. Create a Token for one user enrolled in the course:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      4. Next, you can do a CURL REST call simulating a WS client with the user.
        • You need to replace the wstoken, courseid and the URL of your moodle instance

          curl 'https://latrobe.moodlecloud.com/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=6&moodlewssettingfilter=true&wsfunction=core_course_get_contents&wstoken=dee52490e679ab04c3ff6527c4efa9aa' --compressed | python -m "json.tool"

      5. Check that in the returned response you see the section summary including the iframe tags
      Show
      Create a course, edit a section and in the summary add HTML code including an iframe pointing to any url (youtube for example) As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for one user enrolled in the course: 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, courseid and the URL of your moodle instance curl 'https://latrobe.moodlecloud.com/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=6&moodlewssettingfilter=true&wsfunction=core_course_get_contents&wstoken=dee52490e679ab04c3ff6527c4efa9aa' --compressed | python -m "json.tool" Check that in the returned response you see the section summary including the iframe tags

    Description

      This text is returned always not cleaned (noclean = true, see format_section_renderer_base->format_summary_text)

      Attachments

        Activity

          People

            jleyva Juan Leyva
            jleyva Juan Leyva
            Frédéric Massart Frédéric Massart
            Dan Poltawski Dan Poltawski
            Jun Pataleta Jun Pataleta
            Juan Leyva, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Jul/16