• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.9
    • 2.8.5
    • Web Services
    • MOODLE_28_STABLE
    • MOODLE_29_STABLE
    • MDL-49504-master
    • Hide

      Note: Version number is bumped because a new web service is added into the Mobile app service.

      1. Create a new course, enrol a student and a teacher to that course
      2. As teacher, add a course or personal note for a student in that course
      3. Now, go to view the course notes (via the navigation menu Participants - Notes)
      4. As an admin, check that in the System Report / Logs you see the "Notes viewed" action for the current user
      5. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      6. Create a Token for a teacher or admin enrolled in the course you used previously:
        • Click on Site administration ► Plugins ► Web services ► Mobile
      7. Next, you can do a CURL REST call simulating a WS client with the student user .
        • You need to replace the wstoken, userid (with the student user id) and courseid and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'userid=0&courseid=4&wsfunction=core_notes_view_notes&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e'

      8. Confirm that
        • You can see new entries in the course log (notes viewed) for that course and the user. The origin for the new log entries is "ws"
      9. Try to use invalid course or users, you will see different errors
      Show
      Note: Version number is bumped because a new web service is added into the Mobile app service. Create a new course, enrol a student and a teacher to that course As teacher, add a course or personal note for a student in that course Now, go to view the course notes (via the navigation menu Participants - Notes) As an admin, check that in the System Report / Logs you see the "Notes viewed" action for the current user As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for a teacher or admin enrolled in the course you used previously: Click on Site administration ► Plugins ► Web services ► Mobile Next, you can do a CURL REST call simulating a WS client with the student user . You need to replace the wstoken, userid (with the student user id) and courseid and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'userid=0&courseid=4&wsfunction=core_notes_view_notes&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e' Confirm that You can see new entries in the course log (notes viewed) for that course and the user. The origin for the new log entries is "ws" Try to use invalid course or users, you will see different errors

      Trigger the notes_viewed event when a user view a list of course notes (this web service will be initially used by the mobile app so information can be logged in the Moodle side when a user see the same page in the app).

            jleyva Juan Leyva
            jleyva Juan Leyva
            Dani Palou Dani Palou
            Dan Poltawski Dan Poltawski
            Dave Cooper Dave Cooper
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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