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

core_course_check_updates fails (error 500) for new comments in wiki/glossary

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a wiki, add a home page for the wiki and a comment in that page (using the comments tab at the top)
      2. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      3. Create a Token in the mobile app service for one teacher in the wiki 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, the since parameter (use one from an hour ago), the tocheck[0][id] with the wiki cmdi and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=16&tocheck[0][contextlevel]=module&tocheck[0][id]=353&tocheck[0][since]=1479575320&wsfunction=core_course_check_updates&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e' | python -m "json.tool"

      5. Check that you receive updates for the module: "name: comments" and in "itemids" the id of the new comment.
      Show
      Create a wiki, add a home page for the wiki and a comment in that page (using the comments tab at the top) As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for one teacher in the wiki 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, the since parameter (use one from an hour ago), the tocheck [0] [id] with the wiki cmdi and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=16&tocheck [0] [contextlevel] =module&tocheck [0] [id] =353&tocheck [0] [since] =1479575320&wsfunction=core_course_check_updates&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e' | python -m "json.tool" Check that you receive updates for the module: "name: comments" and in "itemids" the id of the new comment.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57052-master

      Description

      How to reproduce:

      1. Create a wiki or glossary and add 1 page or entry.
      2. In the app, check for updates for that module with current timestamp. Check that no updates are returned.
      3. Now add a comment to the entry/page.
      4. Call the WS again with the same params and check that an error 500 is returned.

      We should check ALL modules that accept comments. It doesn't seem to fail for assign feedback comments and quiz comments when reviewing an attempt

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/Dec/16