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

enrol_manual_enrol_users always returns Null

$
0
0
by Rixan Randria.  

Hello.

I definitely have the same problem as this old discussion with no answers : https://moodle.org/mod/forum/discuss.php?d=350722

the difference is they use Soap, I use Rest

The function just returned "Null" with no exception error.

$user2enrol001 = array( "roleid" => 5, "userid" => 6, "courseid" => 4 );

$user2enrol002 = array( "roleid" => 5, "userid" => 7, "courseid" => 4 );

$user2enrol003 = array( "roleid" => 5, "userid" => 8, "courseid" => 4 );

array_push($enrolments, $user2enrol001, $user2enrol002, $user2enrol003);

$json = $MoodleRest->request('enrol_manual_enrol_users', array("enrolments" => $enrolments));

echo $json;


Ce dernier echo affiche juste "Null"


Viewing all articles
Browse latest Browse all 2362

Trending Articles



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