Hello,
when a teacher was enrolled through an external database and subsequently de-enrolled, with the status of suspended he continues to be displayed in the block even though he is no longer a teacher of the course.
I solved it as follows:
file: block_messageteache.php
line: 93
add :
$where .= ' AND ra.userid not in(select userid FROM {user_enrolments} where' . ' userid=ra.userid and enrolid=ra.itemid and status=1) ';
because if mdl_user_enrolments.status =1 ----->>> user inative in course
Hello, when a teacher was enrolled through an external database and subsequently de-enrolled, with the status of suspended he continues to be displayed in the block even though he is no longer a teacher of the course. I solved it as follows: file: block_messageteache.php line: 93 add :
$where .= ' AND ra.userid not in(select userid FROM {user_enrolments} where' . ' userid=ra.userid and enrolid=ra.itemid and status=1) ';
because if mdl_user_enrolments.status =1 ----->>> user inative in course