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

WS mod_assign_submit_grading_form cannot be used from Mobile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 3.2
    • 3.2
    • Assignment
    • MOODLE_32_STABLE
    • MOODLE_32_STABLE
    • MDL-56638-master
    • 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 : [ ].

      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)

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