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

Create missing Web Services to trigger dashboard related events

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_403_STABLE
    • MDL-73239-master
    • Hide

      Note: The version number is bumped because new web services are added into the Mobile app service and into the core list of external functions.

      1. As admin, enable "Mobile services":
        Click on Site administration ► Plugins ► Web Services ► Mobile
      2. Create a Token for the student1
        Click on Site administration ► Plugins ► Web services ► Manage tokens
      3. Next, you can do a CURL REST call simulating a WS client with the student1 user token.
      4. You need to replace the wstoken, page (can be "my" or "dashboard") and the URL of your moodle instance

        curl 'MOODLE_URL/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_my_view_page&wstoken=$wstoken&page=my' --compressed

        • Change the value of page to dashboard and make the request again
        • Put a wrong value on page to return false and notice filled
      1. Access your system logs, filter by Web service, and check if you have a my and dashboard view registers for student1 from Webservice that you created:
        Click on Site administration ► Reports ► Logs
      Show
      Note: The version number is bumped because new web services are added into the Mobile app service and into the core list of external functions. As admin, enable "Mobile services": Click on Site administration ► Plugins ► Web Services ► Mobile Create a Token for the student1 Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the student1 user token. You need to replace the wstoken, page (can be "my" or "dashboard") and the URL of your moodle instance curl 'MOODLE_URL/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_my_view_page&wstoken=$wstoken&page=my' --compressed Change the value of page to dashboard and make the request again Put a wrong value on page to return false and notice filled Access your system logs, filter by Web service, and check if you have a my and dashboard view registers for student1 from Webservice that you created: Click on Site administration ► Reports ► Logs

      This is a follow-up of MDL-73087

      A new WS to trigger the my_courses_viewed event will be necessary (core_my_view_mycourses) and it seems we are missing from some time ago the equivalent for dashboard, core_my_view_dashboard)

      I think that conceptually we can have just one core_my_view($mypage)

            rodrigo.mady@moodle.com Rodrigo Mady
            jleyva Juan Leyva
            Juan Leyva Juan Leyva
            Andrew Lyons Andrew Lyons
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 3 hours, 20 minutes
                1w 3h 20m

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