MDL-30085 core_grades functions moved to correct location