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

WS mod_assign_submit_grading_form cannot be used from Mobile

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a course with a teacher and a student and one assignment.
      2. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      3. Create a Token for the student 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 teacher user.
        • You need to replace the wstoken, assignid (id of the created assign), userid (teacher id) and the URL of your moodle instance.

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'assignmentid=1&userid=3&jsonformdata=%22grade%3D2%26attemptnumber%0D0%26addattempt%3D0%26workflowstate%3Dgraded%26applytoall%3D0%22&wsfunction=mod_assign_submit_grading_form&wstoken=936d4adb5f6834727cf952fa2ab92e62' --compressed

      5. Confirm it does not return any warning. It will return an empty array : [ ].
      Show
      Create a course with a teacher and a student and one assignment. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the student user. Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the teacher user. You need to replace the wstoken, assignid (id of the created assign), userid (teacher id) and the URL of your moodle instance. curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'assignmentid=1&userid=3&jsonformdata=%22grade%3D2%26attemptnumber%0D0%26addattempt%3D0%26workflowstate%3Dgraded%26applytoall%3D0%22&wsfunction=mod_assign_submit_grading_form&wstoken=936d4adb5f6834727cf952fa2ab92e62' --compressed Confirm it does not return any warning. It will return an empty array : [ ].
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-56638-master

      Description

      Web using this function as a webservice it does not assume it's being submitted and also checks an non-existant sesskey. (Sesskey is checked using required_param, and cannot be sent from WS)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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