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

Return the course category in core_enrol_get_users_courses

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1, 3.2
    • Fix Version/s: 3.2
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-54800-master

      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

              Assignee:
              jleyva Juan Leyva
              Reporter:
              jleyva Juan Leyva
              Peer reviewer:
              Pau Ferrer
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Rajesh Taneja
              Participants:
              Component watchers:
              Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/Dec/16