migrate the scorm_get_last_completed_attempt() function