XMLWordPrintable

    • 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

      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)

        1. patch.txt
          2 kB
          Paul Charsley

            pcharsle Paul Charsley
            pcharsle Paul Charsley
            Damyon Wiese Damyon Wiese
            Sam Hemelryk Sam Hemelryk
            Adrian Greeve Adrian Greeve
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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