MDL-41227 core_course:fixed up some JS that was confusing activity visibility