Query failed: ERROR: syntax error at or near "and" LINE 1: ...CE((SELECT 1 FROM mdl_user_teachers WHERE userid= and course... ^