Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.5
    • Fix Version/s: 2.9
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide

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

      1. Create a new course
      2. Access to the course participants page via the navigation block
      3. As a teacher or admin, check that in the Report / Logs you see the "User list viewed" actions for the current user.
      4. As admin, enable "Mobile services": Plugins ► Web Services ► External services
      5. Create a Token for the user (not admin):
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      6. Next, you can do a CURL REST call simulating a WS client with the student user .
        • You need to replace the wstoken, courseid and the URL of your moodle instance

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

      7. Confirm that
        • You can see new entries in the course log (User list viewed) for that course and the user. The origin for the new log entries is "ws"
        • If you change courseid to an non-existent course you got an error
        • If you change courseid to a course where you are not enrolled you got an error
      Show
      Note: Version number is bumped because a new web service is added into the Mobile app service. Create a new course Access to the course participants page via the navigation block As a teacher or admin, check that in the Report / Logs you see the "User list viewed" actions for the current user. As admin, enable "Mobile services": Plugins ► Web Services ► External services Create a Token for the user (not admin): Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the student user . You need to replace the wstoken, courseid and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=4&wsfunction=core_user_view_user_list&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e' Confirm that You can see new entries in the course log (User list viewed) for that course and the user. The origin for the new log entries is "ws" If you change courseid to an non-existent course you got an error If you change courseid to a course where you are not enrolled you got an error
    • Affected Branches:
      MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-49498-master

      Description

      Trigger the user_list_viewed event when a user view a list of users (this web service will be initially used by the mobile app so information can be logged in the Moodle side when a user see that section in the app).

        Attachments

          Activity

            People

            Assignee:
            jleyva Juan Leyva
            Reporter:
            jleyva Juan Leyva
            Peer reviewer:
            Dani Palou
            Integrator:
            Damyon Wiese
            Tester:
            Simey Lameze
            Participants:
            Component watchers:
            Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

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