List of my courses - C0D3D3V/Moodle-DL GitHub Wiki
To get a list of all the courses a user is enrolled in, use core_enrol_get_users_courses
. The only requirement is that you have the rights to view the courses of this user, in most cases you can at least view your own courses.
Area | Name | Introduced in | Description |
---|---|---|---|
core_enrol | core_enrol_get_users_courses | 2.0 (2010112400) | get list of course ids that a user is enrolled in (if you are allowed to see that) |
The result is an array of elements that looks like this:
{
"id":23569,
"shortname":"Short name",
"fullname":"Normaly same as shortname",
"enrolledusercount":430,
"idnumber":" (141022-WiSe19\/20) (WiSe19\/20)",
"visible":1,
"summary":"<p><HTML Summary<\/p>",
"summaryformat":1,
"format":"topics",
"showgrades":true,
"lang":"",
"enablecompletion":true,
"category":246,
"progress":100,
"startdate":1569448800,
"enddate":1600984800
}