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

Implement the check_updates callback in the database module

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Calculate your current timestamp (www.unixtimestamp.com)
      2. Create a database activity
      3. As student add to the database activity at least two entries
      4. As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      5. Create a Token in the mobile app service for the student:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      6. 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 (with the timestamp you calculated), the tocheck[0][id] with the database cmdi and the URL of your moodle instance

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

      7. Check that you receive in the itemids field the ids of the new entries you created
      Show
      Calculate your current timestamp (www.unixtimestamp.com) Create a database activity As student add to the database activity at least two entries As admin, enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for the student: 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 (with the timestamp you calculated), the tocheck [0] [id] with the database cmdi and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=17&tocheck [0] [contextlevel] =module&tocheck [0] [id] =367&tocheck [0] [since] =1479575320&wsfunction=core_course_check_updates&wstoken=12a2a65aeea2a177055e233f9e303218' | python -m "json.tool" Check that you receive in the itemids field the ids of the new entries you created
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57925-master

      Description

      Implement the check_updates_callback to retrieve the list of updates in the module since the given time

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jleyva Juan Leyva
              Reporter:
              jleyva Juan Leyva
              Peer reviewer:
              Pau Ferrer
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Damyon Wiese
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/May/17