fix type of grademethod and maxattempt values
migrate the scorm_get_last_completed_attempt() function