MDL-38833 core_grade: added a set_type for finalgrade