Take a look at the following page. It gives many examples of
SQL reports. I didn't see one specifically for your requirement but it should be possible to put what you need together.
Essentially what you want to do is to:
- Get a list of all the courses in which a user is enrolled.
- Loop through each of these courses to see if they have a teacher role. If not, remove the course from the list.
- Display the list.
There are examples of code in Moodle on how to do all of these, just perhaps not a together in one place.
As for displaying it when the user logs in, put the report in a block on your home page or
dashboard.