Fixing condition in get_all_exercises_for_course_id

Only active means active = 1.
Not only active means active = (1 or 0)

See BT#7780 and 6819