Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2363

Re: "Context does not exist" error

$
0
0
by Patrick Pollet.  

@lilian

 

    You are missing an array in your paramters forming line 

$enrolment = array(
'roleid' => 5,
'userid' => 24,
'courseid' => 69
);
$enrolments = array( $enrolment );
$params = array( 'enrolments' => $enrolments );

it should be 

$enrolments = array( array($enrolment ));

Note that a tool to generate proper imbrication of parameters for all WS calls has been submitted here

http://tracker.moodle.org/browse/CONTRIB-3472

Cheers

 

;

 

 

 


Viewing all articles
Browse latest Browse all 2363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>