]> git.mjollnir.org Git - moodle.git/commitdiff
Make developer debug mode available to JavaScript.
authortjhunt <tjhunt>
Wed, 29 Oct 2008 08:17:18 +0000 (08:17 +0000)
committertjhunt <tjhunt>
Wed, 29 Oct 2008 08:17:18 +0000 (08:17 +0000)
lib/weblib.php

index eec94562ba008d51ef5449195297e5cf5190f8b3..0f7d2fb4061e929c31713cd58c09cf4b2454531d 100644 (file)
@@ -2807,11 +2807,15 @@ function print_js_config($settings = array(), $prefix='', $return = false) {
  */
 function standard_js_config() {
     global $CFG;
-    return print_js_config(array(
+    $config = array(
         'wwwroot' => $CFG->httpswwwroot, // Yes, really.
         'pixpath' => $CFG->pixpath,
         'modpixpath' => $CFG->modpixpath,
-    ), 'moodle_cfg', true);
+    );
+    if (debugging('', DEBUG_DEVELOPER)) {
+        $config['developerdebug'] = true;
+    }
+    return print_js_config($config, 'moodle_cfg', true);
 }
 
 /**