CONTRIB-4800 :: Enable teachers to preview template or public questionnaires located in courses where they are not enrolled

Signed-off-by: Joseph Rézeau <moodle@rezeau.org>