updated publish grades to handle new database system