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

Re: Unable to manual enrol: enrol_manual_enrol_users

$
0
0
by Tim Titchmarsh.  

Hi

Unlikely to be permissions with that error message I would think, more likely the names of the parameters. I use:


        write_log("add user to course " .  $moodle_user_id . "" .  $course);

        $moodlcourse = new stdClass();

        $moodlcourse->roleid = 5; // student

        $moodlcourse->userid = $moodle_user_id;

        $moodlcourse->courseid = $course;

        array_push($moodlecourses,$moodlcourse);

        $params = array("enrolments" => $moodlecourses);

        //write_log(var_dump_ret($params));

        MoodleIt("enrol_manual_enrol_users", $params);

What do you have ?

Tim


Viewing all articles
Browse latest Browse all 2362

Trending Articles



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