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

Incorrect text formatting in get_databases_by_courses external function

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a database activity in a course, with a description including images
      2. Enable "Mobile services": Plugins ► Web Services ► Mobile
      3. Create a Token for a 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 .
        • You need to replace the wstoken, courseid and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseids%5B0%5D=4&wsfunction=mod_data_get_databases_by_courses&wstoken=1b9cc9f44630b554bb2c9428b8744338' --compressed

          Note, you can use jsonlint.com to validate and format the json returned string or append "| python -m json.tool" to automatically format the command output

      5. Confirm that
        • You see the database description (intro field) including the image links correctly formatted.
      Show
      Create a database activity in a course, with a description including images Enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for a 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 . You need to replace the wstoken, courseid and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseids%5B0%5D=4&wsfunction=mod_data_get_databases_by_courses&wstoken=1b9cc9f44630b554bb2c9428b8744338' --compressed Note, you can use jsonlint.com to validate and format the json returned string or append "| python -m json.tool" to automatically format the command output Confirm that You see the database description (intro field) including the image links correctly formatted.
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-50171-master

      Description

      The module info is not correctly formatted, an itemid value is passed to the external_format_text function when it should be null

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                6/Jul/15