Solved the error when changing the submission period for grades

close #545