set id for created grades

concerns #746