MDL-42604 scorm: Fix division by zero warnings in error logs
MDL-42604 scorm: Minor coding style fixes