altered SQL query to include courses linked to groups via independent…

… learning sessions. refs #3525