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

core_course_check_updates is not returning the ids of the questions updated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide
      1. Create or use an existing quiz with some questions
      2. Update/modify one of the quiz questions (title, description)
      3. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      4. Create a Token in the mobile app service for one teacher in the quiz course:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      5. 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 quiz 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"

      6. Check that you receive updates for the module: "name: questions" and in "itemids" the id of the updated question.
      Show
      Create or use an existing quiz with some questions Update/modify one of the quiz questions (title, description) As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for one teacher in the quiz 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 quiz 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: questions" and in "itemids" the id of the updated question.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57054-master

      Description

      It seems that there is a bug, instead retrieving the question ids a count_record function is called.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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