-
Improvement
-
Resolution: Won't Do
-
Minor
-
None
-
2.0.2, Future Dev
-
MOODLE_20_STABLE
As an external service, I want to enrol users in courses. But I don't know the id of the user, or the contextid of the course.
Solution: expose something like the following:
enrol_user(array $user, array $course, array $role)
|
For example, any of the following should work:
enrol_user(array('username' => 'chrisf') ,
|
array('shortname' => 'PHP 101'),
|
array('shortname' => 'student')
|
);
|
|
enrol_user(array('idnumber' => '0123456'),
|
array('idnumber' => '2010-2012-PHP101'),
|
array('id' => '3')
|
);
|
|
enrol_user(array('email' => 'chrisf@example.com'),
|
array('fullname' => 'Introduction to PHP programming'),
|
array('name' => 'Student')
|
);
|
- has a non-specific relationship to
-
MDL-29934 Web service API Roadmap
-
- Closed
-