From edf13ee87a78a86fa01639ced60de335a8fe19ce Mon Sep 17 00:00:00 2001 From: danmarsden Date: Mon, 10 Nov 2008 07:43:24 +0000 Subject: [PATCH] scorm: MDL-16185 display warning when zlib_compression on - causes errors with certain browsers. --- lang/en_utf8/scorm.php | 1 + mod/scorm/mod_form.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lang/en_utf8/scorm.php b/lang/en_utf8/scorm.php index ecfddfd9d2..9e96c6db49 100644 --- a/lang/en_utf8/scorm.php +++ b/lang/en_utf8/scorm.php @@ -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 diff --git a/mod/scorm/mod_form.php b/mod/scorm/mod_form.php index 33ca7256e5..f9980c138e 100644 --- a/mod/scorm/mod_form.php +++ b/mod/scorm/mod_form.php @@ -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')); -- 2.39.5