MDL-50537 mod_chat: New WS mod_chat_get_chats_by_courses