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

Re: How to get a list of courses for the teacher?

$
0
0
by Juan Leyva.  

You should:

First: core_enrol_get_users_courses for returning all the courses

Next: Get all the participants of that courses using the function: core_enrol_get_enrolled_users (passing as argument withcapability a capability your teachers must have)

And then iterate the courses/users and discard the courses where the user was not returned by the enrolled_users funciton


Viewing all articles
Browse latest Browse all 2363

Trending Articles



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