XMLWordPrintable

Details

    • MOODLE_25_STABLE
    • Hide

      Take the PHP-REST demo client: https://github.com/moodlehq/sample-ws-clients/tree/master/PHP-REST (or another one)

      For each test, you will need to change the code between /// PARAMETERs as specified

      Test 1) - Specify 1 or more assignment ids for which the user has 'mod/assign:grade' capability
      /// PARAMETERS
      $assignmentids[] = 3; // user has 'mod/assign:grade' capability for this assignment
      $assignmentids[] = 4; // user has 'mod/assign:grade' capability for this assignment
      $params = array('assignmentids'=>$assignmentids);
      /// PARAMETERS
      The web service should return the submissions for the specified assignments

      Test 2) - Specify the status of the submissions
      /// PARAMETERS
      $assignmentids[] = 3; // user has 'mod/assign:grade' capability for this assignment
      $assignmentids[] = 4; // user has 'mod/assign:grade' capability for this assignment
      $params = array('assignmentids'=>$assignmentids, 'status'=>'submitted');
      /// PARAMETERS
      The web services shoudld return all submissions for the specified assignments where the status is submitted

      Test 3) - Specify a range of timemodified values
      /// PARAMETERS
      $assignmentids[] = 3; // user has 'mod/assign:grade' capability for this assignment
      $assignmentids[] = 4; // user has 'mod/assign:grade' capability for this assignment
      $params = array('assignmentids'=>$assignmentids, 'since'=>1331862337, 'before'=>1331862900);
      /// PARAMETERS
      The web services shoudld return all submissions for the specified assignments where the timemodified value is between the specified range

      Test 4) - An assignment is specified for which the user does not have the mod/assign:grade capability
      /// PARAMETERS
      $assignmentids[] = 20; //user does not have 'mod/assign:grade' capability for this assignment
      $params = array('assignmentids'=>$assignmentids);
      /// PARAMETERS
      The web service returns a warning message

      Show
      Take the PHP-REST demo client: https://github.com/moodlehq/sample-ws-clients/tree/master/PHP-REST (or another one) For each test, you will need to change the code between /// PARAMETERs as specified Test 1) - Specify 1 or more assignment ids for which the user has 'mod/assign:grade' capability /// PARAMETERS $assignmentids[] = 3; // user has 'mod/assign:grade' capability for this assignment $assignmentids[] = 4; // user has 'mod/assign:grade' capability for this assignment $params = array('assignmentids'=>$assignmentids); /// PARAMETERS The web service should return the submissions for the specified assignments Test 2) - Specify the status of the submissions /// PARAMETERS $assignmentids[] = 3; // user has 'mod/assign:grade' capability for this assignment $assignmentids[] = 4; // user has 'mod/assign:grade' capability for this assignment $params = array('assignmentids'=>$assignmentids, 'status'=>'submitted'); /// PARAMETERS The web services shoudld return all submissions for the specified assignments where the status is submitted Test 3) - Specify a range of timemodified values /// PARAMETERS $assignmentids[] = 3; // user has 'mod/assign:grade' capability for this assignment $assignmentids[] = 4; // user has 'mod/assign:grade' capability for this assignment $params = array('assignmentids'=>$assignmentids, 'since'=>1331862337, 'before'=>1331862900); /// PARAMETERS The web services shoudld return all submissions for the specified assignments where the timemodified value is between the specified range Test 4) - An assignment is specified for which the user does not have the mod/assign:grade capability /// PARAMETERS $assignmentids[] = 20; //user does not have 'mod/assign:grade' capability for this assignment $params = array('assignmentids'=>$assignmentids); /// PARAMETERS The web service returns a warning message

    Description

      Create web service mod_assignment_get_assignment_submissions. This web service will return data from the assignment_submissions table. It will have 2 parameters:

      • A list of assignment ids (required)
      • A status parameter that allows the status of requested submissions to be specified (optional)
      • A since parameter so that only submissions with a timemodified value >= since are returned (optional)
      • A before parameter so that only submissions with a timemodified value <= before are returned (optional)

      Attachments

        1. patch.txt
          2 kB
          Paul Charsley

        Issue Links

          Activity

            People

              pcharsle Paul Charsley
              pcharsle Paul Charsley
              Damyon Wiese Damyon Wiese
              Sam Hemelryk Sam Hemelryk
              Adrian Greeve Adrian Greeve
              Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie, Juan Leyva, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/May/13