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

Outcome's scale information is not present in core_course_get_course_module WS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 3.2
    • 3.2
    • Web Services
    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • MDL-56533-master
    • Easy
    • Hide
      1. Ensure that Outcomes are enabled in advanced features
      2. Create some Outcomes at site level using any one of the existing scales
      3. Create a new assignment activity, configure it to use outcomes.
      4. Enrol a user as student in the course and another user as teacher
      5. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      6. Create a Token for the teacher user:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      7. Next, you can do a CURL REST call simulating a WS client with the student user.
        • You need to replace the wstoken, cmid (with the activity course module id) and the URL of your moodle instance

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

      8. Confirm that you can see all the module information, including outcomes and confirm that outcomes have a the scale information (Comma separated values)
      9. Ensure that the information match the one in the web interface.
      Show
      Ensure that Outcomes are enabled in advanced features Create some Outcomes at site level using any one of the existing scales Create a new assignment activity, configure it to use outcomes. Enrol a user as student in the course and another user as teacher As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the teacher user: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the student user. You need to replace the wstoken, cmid (with the activity course module id) and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'cmid=81&wsfunction=core_course_get_course_module&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' | python -m "json.tool" Confirm that you can see all the module information, including outcomes and confirm that outcomes have a the scale information (Comma separated values) Ensure that the information match the one in the web interface.

      Grade information added on core_course_get_course_module WS does not include scale information about the outcome related to that, so the outcome is not very useful without this information. Check related MDL-55739

            pferre22 Pau Ferrer
            pferre22 Pau Ferrer
            Juan Leyva Juan Leyva
            Andrew Lyons Andrew Lyons
            Damyon Wiese Damyon Wiese
            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.