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

Add itemname to gradereport_user_get_grade_items web service

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.3
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide
      1. Enrol a couple of users as students and teacher in a course
      2. In that course, configure a gradebook with several activities, and at least 1 manual grade item
      3. As admin, enable "Mobile services":
        • Plugins ► Web Services ► Mobile
      4. Create a Token for the student and teacher users:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      5. Perform a CURL REST call simulating a WS client with the user. Replace The student id, course id and token with your values

        curl 'http://localhost:8888/moodle/master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=3&userid=84&wsfunction=gradereport_user_get_grade_items&wstoken=30e3588886d371eb0aaafea1365b7771' | python -m "json.tool"

      6. Check that you:
        • Receive an itemname for all visible grade items. Compare it with the Grade user report that the user should see in the Moodle web version
        • Receive all the grade items visible by the user
        • Check that all the grade items field values are equal to the web version
      Show
      Enrol a couple of users as students and teacher in a course In that course, configure a gradebook with several activities, and at least 1 manual grade item As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the student and teacher users: Click on Site administration ► Plugins ► Web services ► Manage tokens Perform a CURL REST call simulating a WS client with the user. Replace The student id, course id and token with your values curl 'http://localhost:8888/moodle/master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseid=3&userid=84&wsfunction=gradereport_user_get_grade_items&wstoken=30e3588886d371eb0aaafea1365b7771' | python -m "json.tool" Check that you: Receive an itemname for all visible grade items. Compare it with the Grade user report that the user should see in the Moodle web version Receive all the grade items visible by the user Check that all the grade items field values are equal to the web version
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull Master Branch:

      Description

      Currently there doesn't appear to be any way to extract the names of manual grade items using web services.

      Would it be reasonable to include itemname in the output from gradereport_user_get_grade_items ?

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/May/17