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

External function get_course_notes does not return site notes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.9.2
    • 2.9.1
    • Web Services
    • MOODLE_29_STABLE
    • MOODLE_29_STABLE
    • MDL-51325-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 the URL of your moodle instance:

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=5&wsfunction=core_notes_get_course_notes&wstoken=5e418f42c8ff42c54384016ad6c0f764' --compressed | python -m "json.tool"

      1. Confirm that you can see sitenotes, coursenotes and personalnotes
      2. Enrol the teacher in a different course and run the same command replacing the courseid with the new course one. You should see the same site notes that in the previous call
      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 the URL of your moodle instance: curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=5&wsfunction=core_notes_get_course_notes&wstoken=5e418f42c8ff42c54384016ad6c0f764' --compressed | python -m "json.tool" Confirm that you can see sitenotes, coursenotes and personalnotes Enrol the teacher in a different course and run the same command replacing the courseid with the new course one. You should see the same site notes that in the previous call

      There is a bug in the external function that prevents to retrieve sites notes via this function. Currently the function only returns site notes created originally in the course passed as parameter. The function should return all the site notes to mimic how the web interface work (and to allow us to display all the site notes).

            jleyva Juan Leyva
            jleyva Juan Leyva
            Dani Palou Dani Palou
            Andrew Lyons Andrew Lyons
            Simey Lameze Simey Lameze
            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.