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

Return the course category in core_enrol_get_users_courses

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 3.2
    • 3.1, 3.2
    • Web Services
    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • MDL-54800-master
    • Hide
      1. Enrol a user in several courses in different categories
      2. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      3. Create a Token for the user:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      4. Next, you can do a CURL REST call simulating a WS client with the user.
        • You need to replace the wstoken, the userid and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_enrol_get_users_courses&wstoken=ffbe3a3002f235bf9d01fd9369e10b66&userid=106' | python -m "json.tool"

      5. Check that you receive all the courses where the user is enrolled with the correct category value
      Show
      Enrol a user in several courses in different categories As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the user: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the user. You need to replace the wstoken, the userid and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_enrol_get_users_courses&wstoken=ffbe3a3002f235bf9d01fd9369e10b66&userid=106' | python -m "json.tool" Check that you receive all the courses where the user is enrolled with the correct category value

    Description

      We should return the course category, this will be necessary for building a category tree including only categories with courses where the user is enrolled in.

      Attachments

        Issue Links

          Activity

            People

              jleyva Juan Leyva
              jleyva Juan Leyva
              Pau Ferrer Pau Ferrer
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Rajesh Taneja Rajesh Taneja
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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