A set of useful functions for teachers to calcuate grades