Fix grade calculation being broken by NaN grades.
Distinguish enrolled credits by optional and compulsory
host change only on production server