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

Add ability to return all cohorts in WS (backport of MDL-52568)

XMLWordPrintable

    • MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • Hide
      1. Create a bunch of cohorts.
      2. As an admin visit 'Plugins' > 'Web Services' > 'Overview' and follow the required steps:
      3. Create a new Web Service
      4. Add the core_cohort_get_cohorts function
      5. Create a token for a user.
      6. Next you will have to do a CURL REST call simulating a WS client with one of the users - example:

        curl '<yoursite>/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_cohort_get_cohorts&wstoken=<yourtoken>' | python -m "json.tool"

      7. Do the corresponding web service API call to core_cohort_get_cohorts without parameters, checking that all cohorts are returned.
      8. Do the corresponding web service API call to core_cohort_get_cohorts with one or several cohort ids as parameters, to check that the "old" functionality of this function still works as expected.
      Show
      Create a bunch of cohorts. As an admin visit 'Plugins' > 'Web Services' > 'Overview' and follow the required steps: Create a new Web Service Add the core_cohort_get_cohorts function Create a token for a user. Next you will have to do a CURL REST call simulating a WS client with one of the users - example: curl '<yoursite>/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_cohort_get_cohorts&wstoken=<yourtoken>' | python -m "json.tool" Do the corresponding web service API call to core_cohort_get_cohorts without parameters, checking that all cohorts are returned. Do the corresponding web service API call to core_cohort_get_cohorts with one or several cohort ids as parameters, to check that the "old" functionality of this function still works as expected.

      Backport of MDL-52568 to stable branches.
      Add ability to core_cohort_get_cohorts so that it can return all cohorts, as well of the original functionality of returning a certain cohorts when their ids are provided as parameters.

            kevin.bruton Kevin Bruton
            kevin.bruton Kevin Bruton
            Mark Nelson Mark Nelson
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            David Monllaó David Monllaó
            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.