XMLWordPrintable

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

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

      1. Enable notes by configuration (if not already enabled) Home ►Site administration ►Advanced features (checkbox) Enable notes
      2. Create a course with a student and a teacher
      3. As teacher create notes at site, course and personal level for this student
      4. Enable "Mobile services": Plugins ► Web Services ► Mobile
      5. Create a Token for the teacher :
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      6. Next, you can do a couple of CURL REST call simulating a WS client with the teacher user .
        • You need to replace the wstoken, courseid and userid and the URL of your moodle instance:

          curl 'http://localhost/stable_master/webservice/rest/server.php?moodlewsrestformat=json' -H 'Pragma: no-cache' -H 'Origin: file://' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Accept-Language: es,en;q=0.8,de-DE;q=0.6,de;q=0.4,nb;q=0.2' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1798.0 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Cache-Control: no-cache' -H 'Connection: keep-alive' --data 'courseid=5&userid=4&wsfunction=core_notes_get_course_notes
          &wstoken=5e418f42c8ff42c54384016ad6c0f764' --compressed
          

      1. Confirm that you can see sitenotes, coursenotes and personalnotes
        ( in this case one note for each type )
        Add another teacher to this course and repeat the call with his token,
        you should see teacher’s site and course notes (but not personal notes).
        Create a token for an admin or manager (with the capability notes:view at system level), then replace the courseid and userid values with 0. You should retrieve all the site notes for the users in the system.
        Now, as admin or manager use courseid = 0 and a valid userid (with notes at course level) you should see all the notes at site and course level for that user.
      Show
      Note: Version number is bumped because a new web service is added into the Mobile app service. Enable notes by configuration (if not already enabled) Home ►Site administration ►Advanced features (checkbox) Enable notes Create a course with a student and a teacher As teacher create notes at site, course and personal level for this student Enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the teacher : Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a couple of CURL REST call simulating a WS client with the teacher user . You need to replace the wstoken, courseid and userid and the URL of your moodle instance: curl 'http://localhost/stable_master/webservice/rest/server.php?moodlewsrestformat=json' -H 'Pragma: no-cache' -H 'Origin: file://' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Accept-Language: es,en;q=0.8,de-DE;q=0.6,de;q=0.4,nb;q=0.2' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1798.0 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Cache-Control: no-cache' -H 'Connection: keep-alive' --data 'courseid=5&userid=4&wsfunction=core_notes_get_course_notes &wstoken=5e418f42c8ff42c54384016ad6c0f764' --compressed Confirm that you can see sitenotes, coursenotes and personalnotes ( in this case one note for each type ) Add another teacher to this course and repeat the call with his token, you should see teacher’s site and course notes (but not personal notes). Create a token for an admin or manager (with the capability notes:view at system level), then replace the courseid and userid values with 0. You should retrieve all the site notes for the users in the system. Now, as admin or manager use courseid = 0 and a valid userid (with notes at course level) you should see all the notes at site and course level for that user.

      Retrieve a list of notes from a course, filtering by userid (optional)

            jleyva Juan Leyva
            jleyva Juan Leyva
            Dani Palou Dani Palou
            David Monllaó David Monllaó
            Ankit Agarwal Ankit Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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