MDL-43089 quiz renderer. Move changes out of locallib.php.