]> git.mjollnir.org Git - moodle.git/commitdiff
scorm: MDL-16185 display warning when zlib_compression on - causes errors with certai...
authordanmarsden <danmarsden>
Mon, 10 Nov 2008 07:43:24 +0000 (07:43 +0000)
committerdanmarsden <danmarsden>
Mon, 10 Nov 2008 07:43:24 +0000 (07:43 +0000)
lang/en_utf8/scorm.php
mod/scorm/mod_form.php

index ecfddfd9d2063213225434d3ce19308f85ff75de..9e96c6db4951848240fd23ef279f5875c6869cc2 100644 (file)
@@ -188,4 +188,5 @@ $string['noattemptsallowed'] = "Number of attempts allowed";
 $string['noattemptsmade'] = "Number of attempts you have made";
 $string['gradeforattempt'] = "Grade for attempt";
 $string['exceededmaxattempts'] = "You have reached the maximum number of attempts.";
+$string['zlibwarning'] ='Warning: PHP Zlib compression has been enabled on this site, some users may experience issues loading SCORM objects in certain web browsers.'; 
 ?>
\ No newline at end of file
index 33ca7256e591fcaf92b61d0a6c9a1eddae3fbed8..f9980c138ee1ee82ecdb82348e336e52a1e38efa 100644 (file)
@@ -23,6 +23,10 @@ class mod_scorm_mod_form extends moodleform_mod {
         if (!$CFG->slasharguments) {
             $mform->addElement('static', '', '',notify(get_string('slashargs', 'scorm'), 'notifyproblem', 'center', true));
         }
+        $zlib = ini_get('zlib.output_compression'); //check for zlib compression - if used, throw error because of IE bug. - SEE MDL-16185
+        if (isset($zlib) && $zlib) {
+            $mform->addElement('static', '', '',notify(get_string('zlibwarning', 'scorm'), 'notifyproblem', 'center', true));
+        }
 //-------------------------------------------------------------------------------
         $mform->addElement('header', 'general', get_string('general', 'form'));