MDL-41665 scorm locallib.php: Rewriting using html_writer