MDL-38713 course: correctly set visibleold on mod creation