MDL-39209 badges: Fix course badges page access and navigation when course badges are disabled