From 0bb391b7a02638d8b601ed9e47f7fe146544a42e Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 18 Sep 2006 08:57:23 +0000 Subject: [PATCH] Fixed some debugging statements --- mod/scorm/datamodels/scorm1_2.js.php | 12 ++++++------ mod/scorm/datamodels/scorm1_3.js.php | 12 ++++++------ mod/scorm/restorelib.php | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/mod/scorm/datamodels/scorm1_2.js.php b/mod/scorm/datamodels/scorm1_2.js.php index 3b1afd800e..0523d481f4 100644 --- a/mod/scorm/datamodels/scorm1_2.js.php +++ b/mod/scorm/datamodels/scorm1_2.js.php @@ -167,7 +167,7 @@ function SCORMapi1_2() { if (param == "") { if (!Initialized) { debug > 7) && (isadmin())) { + if (debugging()) { echo 'alert("Initialized SCORM 1.2");'; } ?> @@ -188,7 +188,7 @@ function SCORMapi1_2() { if (param == "") { if (Initialized) { debug > 7) && (isadmin())) { + if (debugging()) { echo 'alert("Finished SCORM 1.2");'; } ?> @@ -233,7 +233,7 @@ function SCORMapi1_2() { if (subelement == element) { errorCode = "0"; debug > 7) && (isadmin())) { + if (debugging()) { echo 'alert(element+": "+eval(element));'; } ?> @@ -337,7 +337,7 @@ function SCORMapi1_2() { eval(element+'="'+value+'";'); errorCode = "0"; debug > 7) && (isadmin())) { + if (debugging()) { echo 'alert(element+":= "+value);'; } ?> @@ -353,7 +353,7 @@ function SCORMapi1_2() { } errorCode = "0"; debug > 7) && (isadmin())) { + if (debugging()) { echo 'alert(element+":= "+value);'; } ?> @@ -384,7 +384,7 @@ function SCORMapi1_2() { if (Initialized) { result = StoreData(cmi,false); debug > 7) && (isadmin())) { + if (debugging()) { echo 'alert("Data Commited");'; } ?> diff --git a/mod/scorm/datamodels/scorm1_3.js.php b/mod/scorm/datamodels/scorm1_3.js.php index 309c505bb0..f7e8319f04 100644 --- a/mod/scorm/datamodels/scorm1_3.js.php +++ b/mod/scorm/datamodels/scorm1_3.js.php @@ -186,7 +186,7 @@ function SCORMapi1_3() { if (param == "") { if ((!Initialized) && (!Terminated)) { debug > 7) && (isadmin())) { + if (debugging()) { echo 'alert("Initialized SCORM 1.3");'; } ?> @@ -211,7 +211,7 @@ function SCORMapi1_3() { if (param == "") { if ((Initialized) && (!Terminated)) { debug > 7) && (isadmin())) { + if (debugging()) { echo 'alert("Terminated SCORM 1.3");'; } ?> @@ -262,7 +262,7 @@ function SCORMapi1_3() { if (subelement == element) { errorCode = "0"; debug > 7) && (isadmin())) { + if (debugging()) { echo 'alert(element+": "+eval(element));'; } ?> @@ -377,7 +377,7 @@ function SCORMapi1_3() { eval(element+'="'+value+'";'); errorCode = "0"; debug > 7) && (isadmin())) { + if (debugging()) { echo 'alert(element+":= "+value);'; } ?> @@ -392,7 +392,7 @@ function SCORMapi1_3() { eval(element+'="'+value+'";'); errorCode = "0"; debug > 7) && (isadmin())) { + if (debugging()) { echo 'alert(element+":= "+value);'; } ?> @@ -429,7 +429,7 @@ function SCORMapi1_3() { if ((Initialized) && (!Terminated)) { result = StoreData(cmi,false); debug > 7) && (isadmin())) { + if (debugging()) { echo 'alert("Data Commited");'; } ?> diff --git a/mod/scorm/restorelib.php b/mod/scorm/restorelib.php index 748d648569..48733fb7c6 100755 --- a/mod/scorm/restorelib.php +++ b/mod/scorm/restorelib.php @@ -482,7 +482,7 @@ //Update record $scorm->summary = addslashes($result); $status = update_record("scorm",$scorm); - if ($CFG->debug>7) { + if (debugging()) { if (!defined('RESTORE_SILENTLY')) { echo '

'.htmlentities($content).'
changed to
'.htmlentities($result).'

'; } -- 2.39.5