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

The new option not to display grader to students breaks the WS mod_assign_get_submission_status

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.7
    • 3.7
    • Assignment
    • MOODLE_37_STABLE
    • MOODLE_37_STABLE
    • MDL-64761-master
    • Hide

       

      1. Create a course with a student, the course must have at least one section.
      2. Create an assignment with the 'Hide Grader' option enabled.
      3. Log in as the student and add a submission to the assignment.
      4. Log in as teacher and grade the submission.
      5. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      6. Create a Token for the student 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, assignid (the assign instance value) and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'assignid=1&wsfunction=mod_assign_get_submission_status&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e' --compressed

      1. Confirm that
        • No exception is returned.
        • The value of feedback->grade->grader is -1.
      Show
        Create a course with a student, the course must have at least one section. Create an assignment with the 'Hide Grader' option enabled . Log in as the student and add a submission to the assignment. Log in as teacher and grade the submission. 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 student user . You need to replace the wstoken, assignid (the assign instance value) and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'assignid=1&wsfunction=mod_assign_get_submission_status&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e' --compressed Confirm that No exception is returned. The value of feedback->grade->grader is -1.

      In the changes to support this setting in the WS, the grader is set to false. However, that parameter has type PARAM_INT so the WS returns an invalid_response_exception error.

        1. MDL-64761.jpg
          69 kB
          Anna Carissa Sadia

            dpalou Dani Palou
            dpalou Dani Palou
            Juan Leyva Juan Leyva
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.