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

    • Bug
    • Resolution: Fixed
    • Major
    • 3.2
    • 3.2
    • Web Services
    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • MDL-57052-master
    • 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.

    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

            jleyva Juan Leyva
            dpalou Dani Palou
            Dani Palou Dani Palou
            David Monllaó David Monllaó
            Ankit Agarwal Ankit Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Clockify

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.