Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3
    • 2.3
    • Groups, Web Services
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • MDL-32662-core_course_groups_xxx_groupings
    • 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 ))),

    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

              jleyva Juan Leyva
              jerome Jérôme Mouneyrac
              Jérôme Mouneyrac Jérôme Mouneyrac
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Rossiani Wijaya Rossiani Wijaya
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                25/Jun/12