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

Error in web service: core_group_get_course_groups and core_group_get_course_members

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Minor
    • None
    • 2.3
    • Web Services
    • MOODLE_23_STABLE

    Description

      I'm converting the Web Service version 2.2 to version 2.3 +.

        core_group_get_course_groups
        core_group_get_course_members

      Not working properly.

      This is my code:

      <?php
      	
      	$token = '1cea1a5f1049acb07e29f0b26230c149';
      	$domainname = 'http://10.0.0.18/moodle';
      	$functionname = 'core_group_get_group_members';
      	
      	$user1 = new stdClass();
      	$user1->groupid = '2';
      	
      	$params = $user1;
       
      	/// XML-RPC 
      	header('Content-Type: text/plain');
      	$serverurl = $domainname . '/webservice/xmlrpc/server.php'. '?wstoken=' . $token;
      	require_once('./curl.php');
      	$curl = new curl;
      	$post = xmlrpc_encode_request($functionname, array($params));
      	$resp = xmlrpc_decode($curl->post($serverurl, $post));
      	print_r($resp);
       
      ?>

      <?php
       
      	$token = 'b3fdec752c72ac41f6e6bewe3854c55a';
      	$domainname = 'http://10.0.0.18/moodle9';
              $functionname = 'core_group_get_course_groups';
       
              $params = '2';
       
              /// XML-RPC CALL 
              header('Content-Type: text/plain');
              $serverurl = $domainname . '/webservice/xmlrpc/server.php'. '?wstoken=' . $token;
              require_once('./curl.php');
              $curl = new curl;
              $post = xmlrpc_encode_request($functionname, $params);
              $resp = xmlrpc_decode($curl->post($serverurl, $post));
       
              print_r($resp);
       
      ?>

      Error occurs:

      array
      (
           [faultCode] => 404
           [faultString] => Unknown error
      )

      Attachments

        Issue Links

          Activity

            People

              jerome Jérôme Mouneyrac
              eilion Javier González
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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