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

Section summary text is cleaned in WS get_course_contents

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.0.5, 3.1.1
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-55019-master

      Description

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

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Jul/16