Ok so Im trying to show only courses for users who are not suspended.
I thought this would work:
if ($mycourses = enrol_get_my_courses(['enddate'], 'visible DESC, '.$sortorder.' ASC', $courses_limit))
However, for some reason students cant see courses they are suspended in - which is what I want, but teachers can see courses they are suspended in.
And some reason, as the Administrator, if I suspend myself as a teacher in a course, it no longer shows the course, which is what I want.
any help would be great.
Cheers,
Brad