]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed some debugging statements
authormoodler <moodler>
Mon, 18 Sep 2006 08:57:23 +0000 (08:57 +0000)
committermoodler <moodler>
Mon, 18 Sep 2006 08:57:23 +0000 (08:57 +0000)
mod/scorm/datamodels/scorm1_2.js.php
mod/scorm/datamodels/scorm1_3.js.php
mod/scorm/restorelib.php

index 3b1afd800ea1e853fc608103bbb8e1de37a2bf60..0523d481f4616534dfc447a692a66ae45c18bc8d 100644 (file)
@@ -167,7 +167,7 @@ function SCORMapi1_2() {
         if (param == "") {
             if (!Initialized) {
                 <?php 
-                    if (($CFG->debug > 7) && (isadmin())) {
+                    if (debugging()) {
                         echo 'alert("Initialized SCORM 1.2");';
                     }
                 ?>
@@ -188,7 +188,7 @@ function SCORMapi1_2() {
         if (param == "") {
             if (Initialized) {
                 <?php 
-                    if (($CFG->debug > 7) && (isadmin())) {
+                    if (debugging()) {
                         echo 'alert("Finished SCORM 1.2");';
                     }
                 ?>
@@ -233,7 +233,7 @@ function SCORMapi1_2() {
                             if (subelement == element) {
                             errorCode = "0";
                             <?php 
-                                if (($CFG->debug > 7) && (isadmin())) {
+                                if (debugging()) {
                                     echo 'alert(element+": "+eval(element));';
                                 }
                             ?>
@@ -337,7 +337,7 @@ function SCORMapi1_2() {
                                         eval(element+'="'+value+'";');
                                         errorCode = "0";
                                         <?php 
-                                            if (($CFG->debug > 7) && (isadmin())) {
+                                            if (debugging()) {
                                                 echo 'alert(element+":= "+value);';
                                             }
                                         ?>
@@ -353,7 +353,7 @@ function SCORMapi1_2() {
                                     }
                                     errorCode = "0";
                                     <?php 
-                                        if (($CFG->debug > 7) && (isadmin())) {
+                                        if (debugging()) {
                                             echo 'alert(element+":= "+value);';
                                         }
                                     ?>
@@ -384,7 +384,7 @@ function SCORMapi1_2() {
             if (Initialized) {
                 result = StoreData(cmi,false);
                 <?php 
-                    if (($CFG->debug > 7) && (isadmin())) {
+                    if (debugging()) {
                         echo 'alert("Data Commited");';
                     }
                 ?>
index 309c505bb0f924a1e193448408c0b7d83b97e8f9..f7e8319f04ec2b3d7fb8c6ebfba53da93e2fa683 100644 (file)
@@ -186,7 +186,7 @@ function SCORMapi1_3() {
         if (param == "") {
             if ((!Initialized) && (!Terminated)) {
                 <?php 
-                    if (($CFG->debug > 7) && (isadmin())) {
+                    if (debugging()) {
                         echo 'alert("Initialized SCORM 1.3");';
                     }
                 ?>
@@ -211,7 +211,7 @@ function SCORMapi1_3() {
         if (param == "") {
             if ((Initialized) && (!Terminated)) {
                 <?php 
-                    if (($CFG->debug > 7) && (isadmin())) {
+                    if (debugging()) {
                         echo 'alert("Terminated SCORM 1.3");';
                     }
                 ?>
@@ -262,7 +262,7 @@ function SCORMapi1_3() {
                         if (subelement == element) {
                             errorCode = "0";
                             <?php 
-                                if (($CFG->debug > 7) && (isadmin())) {
+                                if (debugging()) {
                                     echo 'alert(element+": "+eval(element));';
                                 }
                             ?>
@@ -377,7 +377,7 @@ function SCORMapi1_3() {
                                             eval(element+'="'+value+'";');
                                             errorCode = "0";
                                             <?php 
-                                                if (($CFG->debug > 7) && (isadmin())) {
+                                                if (debugging()) {
                                                     echo 'alert(element+":= "+value);';
                                                 }
                                             ?>
@@ -392,7 +392,7 @@ function SCORMapi1_3() {
                                     eval(element+'="'+value+'";');
                                     errorCode = "0";
                                     <?php 
-                                        if (($CFG->debug > 7) && (isadmin())) {
+                                        if (debugging()) {
                                             echo 'alert(element+":= "+value);';
                                         }
                                     ?>
@@ -429,7 +429,7 @@ function SCORMapi1_3() {
             if ((Initialized) && (!Terminated)) {
                 result = StoreData(cmi,false);
                 <?php 
-                    if (($CFG->debug > 7) && (isadmin())) {
+                    if (debugging()) {
                         echo 'alert("Data Commited");';
                     }
                 ?>
index 748d64856973d4f20e74d2718550b97e53ce1f01..48733fb7c6eea0dfee8496d3de4aee48d6f3e132 100755 (executable)
                     //Update record
                     $scorm->summary = addslashes($result);
                     $status = update_record("scorm",$scorm);
-                    if ($CFG->debug>7) {
+                    if (debugging()) {
                         if (!defined('RESTORE_SILENTLY')) {
                             echo '<br /><hr />'.htmlentities($content).'<br />changed to<br />'.htmlentities($result).'<hr /><br />';
                         }