$extrawhere='ue.status = '.$statussuspended.' AND e.status = '.$enrolmentactive.' AND ue.timestart < '.$now1.' AND (ue.timeend = 0 OR ue.timeend > '.$now2.')';
// Get course teachers based on global teacher roles
// Get course teachers based on global teacher roles
if(count($teacherroles)>0){
if(count($teacherroles)>0){
// Check if we have to include teacher roles from parent contexts
// Check if we have to include teacher roles from parent contexts
// If yes
// If yes
if($coc_config->teacherrolesparent==1){
if($coc_config->teacherrolesparent==1){
if($coc_config->teacherroleshidesuspendedteacher==0){// also show suspended teachers
$string['teacherroles_desc']='Define which roles are handled as teacher roles by this plugin<br /><em>This setting is only processed when show teacher name is activated or when the teacher filter is activated or when the priorization of courses in which I teach is activated</em>';
$string['teacherroles_desc']='Define which roles are handled as teacher roles by this plugin<br /><em>This setting is only processed when show teacher name is activated or when the teacher filter is activated or when the priorization of courses in which I teach is activated</em>';
$string['teacherroleshidesuspendedteacher']='Verify active teacher enrolment';
$string['teacherrolessuspendedteacher_desc']='If this option is active, it will check for suspended but enroled teachers and will NOT display them as teachers in the course information. This will cause a little higher load on the database. So just activate if you are sure that you really need this feature.';
$string['teacherrolesparent_desc']='When looking for teachers with the specified teacher roles, include teachers who have their role assigned in parent contexts (course category or system level)<br /><em>This setting is only processed when show teacher name is activated or when the teacher filter is activated.</em><br /><em>Warning: If you set this to "No" or "Depending on the user\'s moodle/course:reviewotherusers capability", the "Prioritize courses in which I teach" function will also be influenced and will not priorize courses where the user has his teacher role assigned in parent contexts.</em>';
$string['teacherrolesparent_desc']='When looking for teachers with the specified teacher roles, include teachers who have their role assigned in parent contexts (course category or system level)<br /><em>This setting is only processed when show teacher name is activated or when the teacher filter is activated.</em><br /><em>Warning: If you set this to "No" or "Depending on the user\'s moodle/course:reviewotherusers capability", the "Prioritize courses in which I teach" function will also be influenced and will not priorize courses where the user has his teacher role assigned in parent contexts.</em>';
$string['teacherrolesparentcapability']='Depending on the user\'s moodle/course:reviewotherusers capability';
$string['teacherrolesparentcapability']='Depending on the user\'s moodle/course:reviewotherusers capability';