Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Groups, Web Services
    • Labels:
    • Testing Instructions:
      Hide

      Use this client:
      https://github.com/moodlehq/sample-ws-clients/tree/master/PHP-REST

      functionname
      core_group_create_groupings

      /// PARAMETERS
      $params = array('groupings' => array(
      array(
      'courseid' => $courseid,
      'name' => 'My grouping 1'.rand(),
      'description' => '<b>Description</b>'
      ),
      array(
      'courseid' => $courseid,
      'name' => 'My second grouping'.rand(),
      'description' => '<h2></h2><p><b>HTML description</b></p>'
      )))

      core_group_update_groupings

      /// PARAMETERS
      // Change the id values
      $params = array('groupings' => array(
      array(
      'id' => 1,
      'name' => 'My grouping 1'.rand(),
      'description' => '<b>Description</b>'
      ),
      array(
      'id' => 2,
      'name' => 'My second grouping'.rand(),
      'description' => '<h2></h2><p><b>HTML description</b></p>'
      )))

      core_group_get_groupings
      // Change groupingids
      $params = array('groupingids' => array(1,2))

      core_group_get_course_groupings
      // Change courseid value

      $params = array('courseid' => 2)

      core_group_delete_groupings
      // Change groupingids

      $params = array('groupingids' => array(1,2))

      core_group_assign_grouping
      // Change groupingid and groupid to your Moodle test installation values

      $params = array('assignments' => array(array(
      'groupingid' => 1,
      'groupid' => 1
      ),
      array(
      'groupingid' => 1,
      'groupid' => 2
      ))),

      core_group_unassign_grouping
      // Change groupingid and groupid to your Moodle test installation values

      $params = array('unassignments' => array(array(
      'groupingid' => 1,
      'groupid' => 1
      ),
      array(
      'groupingid' => 1,
      'groupid' => 2
      ))),

      Show
      Use this client: https://github.com/moodlehq/sample-ws-clients/tree/master/PHP-REST functionname core_group_create_groupings /// PARAMETERS $params = array('groupings' => array( array( 'courseid' => $courseid, 'name' => 'My grouping 1'.rand(), 'description' => '<b>Description</b>' ), array( 'courseid' => $courseid, 'name' => 'My second grouping'.rand(), 'description' => '<h2></h2><p><b>HTML description</b></p>' ))) core_group_update_groupings /// PARAMETERS // Change the id values $params = array('groupings' => array( array( 'id' => 1, 'name' => 'My grouping 1'.rand(), 'description' => '<b>Description</b>' ), array( 'id' => 2, 'name' => 'My second grouping'.rand(), 'description' => '<h2></h2><p><b>HTML description</b></p>' ))) core_group_get_groupings // Change groupingids $params = array('groupingids' => array(1,2)) core_group_get_course_groupings // Change courseid value $params = array('courseid' => 2) core_group_delete_groupings // Change groupingids $params = array('groupingids' => array(1,2)) core_group_assign_grouping // Change groupingid and groupid to your Moodle test installation values $params = array('assignments' => array(array( 'groupingid' => 1, 'groupid' => 1 ), array( 'groupingid' => 1, 'groupid' => 2 ))), core_group_unassign_grouping // Change groupingid and groupid to your Moodle test installation values $params = array('unassignments' => array(array( 'groupingid' => 1, 'groupid' => 1 ), array( 'groupingid' => 1, 'groupid' => 2 ))),
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-32662-core_course_groups_xxx_groupings

      Description

      • core_group_create_groupings
      • core_group_update_groupings
      • core_group_delete_groupings
      • core_group_get_groupings
      • core_group_get_course_groupings
      • core_group_assing_grouping
      • core_group_unassing_grouping

      Note for all web service contributors: please keep following the document http://docs.moodle.org/dev/How_to_contribute_a_web_service_function_to_core#Create_a_tracker_issue => one web service function == one tracker issue. This bulk issue is an exception. All the group functions are pretty similar and it is a first test to see if this implementation process saves some time or not compare to deal with one web service function per issue. Thank you.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Jun/12