From c78b79d0372543e0ae7127945fff4b2722d7f104 Mon Sep 17 00:00:00 2001 From: piers Date: Tue, 9 Dec 2008 22:00:03 +0000 Subject: [PATCH] MDL-17572 - remove php short tags. --- mod/scorm/datamodels/debug.js.php | 64 +++++++++++++++---------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/mod/scorm/datamodels/debug.js.php b/mod/scorm/datamodels/debug.js.php index 632e68d580..d55f64ef7b 100644 --- a/mod/scorm/datamodels/debug.js.php +++ b/mod/scorm/datamodels/debug.js.php @@ -253,7 +253,7 @@ function UpdateLog(s) { + ' alert("Unable to locate the LMS\'s API Implementation.\\nLMSInitialize was not successful."); \n' + ' return "false"; \n' + ' } \n' - + ' var result = api.Initialize(""); \n' + + ' var result = api.Initialize(""); \n' + ' if (result.toString() != "true") { \n' + ' var err = ErrorHandler(); \n' + ' } \n' @@ -268,7 +268,7 @@ function UpdateLog(s) { + ' return "false"; \n' + ' } else { \n' + ' // call the LMSFinish function that should be implemented by the API \n' - + ' var result = api.Finish(""); \n' + + ' var result = api.Finish(""); \n' + ' if (result.toString() != "true") { \n' + ' var err = ErrorHandler(); \n' + ' } \n' @@ -299,12 +299,12 @@ function UpdateLog(s) { + ' alert("Unable to locate the LMS\'s API Implementation.\\nLMSGetValue was not successful."); \n' + ' return ""; \n' + ' } else { \n' - + ' var value = api.GetValue(name); \n' - + ' var errCode = api.GetLastError().toString(); \n' + + ' var value = api.GetValue(name); \n' + + ' var errCode = api.GetLastError().toString(); \n' + ' if (errCode != _NoError) { \n' + ' // an error was encountered so display the error description \n' - + ' var errDescription = api.GetErrorString(errCode); \n' - + ' alert("GetValue("+name+") failed. \\n"+ errDescription); \n' + + ' var errDescription = api.GetErrorString(errCode); \n' + + ' alert("GetValue("+name+") failed. \\n"+ errDescription); \n' + ' return ""; \n' + ' } else { \n' + ' return value.toString(); \n' @@ -319,7 +319,7 @@ function UpdateLog(s) { + ' alert("Unable to locate the LMS\'s API Implementation.\\nLMSSetValue was not successful."); \n' + ' return; \n' + ' } else { \n' - + ' var result = api.SetValue(name, value); \n' + + ' var result = api.SetValue(name, value); \n' + ' if (result.toString() != "true") { \n' + ' var err = ErrorHandler(); \n' + ' } \n' @@ -334,7 +334,7 @@ function UpdateLog(s) { + ' alert("Unable to locate the LMS\'s API Implementation.\\nLMSCommit was not successful."); \n' + ' return "false"; \n' + ' } else { \n' - + ' var result = api.Commit(""); \n' + + ' var result = api.Commit(""); \n' + ' if (result != "true") { \n' + ' var err = ErrorHandler(); \n' + ' } \n' @@ -349,7 +349,7 @@ function UpdateLog(s) { + ' //since we can\'t get the error code from the LMS, return a general error \n' + ' return _GeneralError; \n' + ' } \n' - + ' return api.GetLastError().toString(); \n' + + ' return api.GetLastError().toString(); \n' + '} \n' + ' \n' + 'function doLMSGetErrorString(errorCode) { \n' @@ -357,7 +357,7 @@ function UpdateLog(s) { + ' if (api == null) { \n' + ' alert("Unable to locate the LMS\'s API Implementation.\\nLMSGetErrorString was not successful."); \n' + ' } \n' - + ' return api.GetErrorString(errorCode).toString(); \n' + + ' return api.GetErrorString(errorCode).toString(); \n' + '} \n' + ' \n' + 'function doLMSGetDiagnostic(errorCode) { \n' @@ -365,7 +365,7 @@ function UpdateLog(s) { + ' if (api == null) { \n' + ' alert("Unable to locate the LMS\'s API Implementation.\\nLMSGetDiagnostic was not successful."); \n' + ' } \n' - + ' return api.GetDiagnostic(errorCode).toString(); \n' + + ' return api.GetDiagnostic(errorCode).toString(); \n' + '} \n' + ' \n' + 'function LMSIsInitialized() { \n' @@ -377,8 +377,8 @@ function UpdateLog(s) { + ' alert("Unable to locate the LMS\'s API Implementation.\\nLMSIsInitialized() failed."); \n' + ' return false; \n' + ' } else { \n' - + ' var value = api.GetValue("cmi.core.student_name"); \n' - + ' var errCode = api.GetLastError().toString(); \n' + + ' var value = api.GetValue("cmi.core.student_name"); \n' + + ' var errCode = api.GetLastError().toString(); \n' + ' if (errCode == _NotInitialized) { \n' + ' return false; \n' + ' } else { \n' @@ -394,13 +394,13 @@ function UpdateLog(s) { + ' return; \n' + ' } \n' + ' // check for errors caused by or from the LMS \n' - + ' var errCode = api.GetLastError().toString(); \n' + + ' var errCode = api.GetLastError().toString(); \n' + ' if (errCode != _NoError) { \n' + ' // an error was encountered so display the error description \n' - + ' var errDescription = api.GetErrorString(errCode); \n' + + ' var errDescription = api.GetErrorString(errCode); \n' + ' if (_Debug == true) { \n' + ' errDescription += "\\n"; \n' - + ' errDescription += api.GetDiagnostic(null); \n' + + ' errDescription += api.GetDiagnostic(null); \n' + ' // by passing null to LMSGetDiagnostic, we get any available diagnostics \n' + ' // on the previous error. \n' + ' } \n' @@ -417,7 +417,7 @@ function UpdateLog(s) { + '} \n' + ' \n' + 'function findAPI(win) { \n' - + ' while ((win. == null) && (win.parent != null) && (win.parent != win)) { \n' + + ' while ((win. == null) && (win.parent != null) && (win.parent != win)) { \n' + ' findAPITries++; \n' + ' // Note: 7 is an arbitrary number, but should be more than sufficient \n' + ' if (findAPITries > 7) { \n' @@ -426,7 +426,7 @@ function UpdateLog(s) { + ' } \n' + ' win = win.parent; \n' + ' } \n' - + ' return win.; \n' + + ' return win.; \n' + '} \n' + ' \n' + 'function getAPI() { \n' @@ -444,11 +444,11 @@ function UpdateLog(s) { + ' var result = doLMSInitialize(); \n' + ' var msg; \n' + ' if(result == "true") { \n' - + ' msg = "Initialize Successful!"; \n' + + ' msg = "Initialize Successful!"; \n' + ' } else { \n' + ' var err = doLMSGetLastError(); \n' + ' var errString = doLMSGetErrorString(err); \n' - + ' msg = "Initialize Failed! Error Code: "+err; \n' + + ' msg = "Initialize Failed! Error Code: "+err; \n' + ' msg += " Error Description: " + errString; \n' + ' } \n' + ' document.initForm.msgtxt.value= msg; \n' @@ -458,11 +458,11 @@ function UpdateLog(s) { + ' var result = doLMSCommit(); \n' + ' var msg; \n' + ' if(result == "true") { \n' - + ' msg = "Commit was Successful!"; \n' + + ' msg = "Commit was Successful!"; \n' + ' } else { \n' + ' var err = doLMSGetLastError(); \n' + ' var errString = doLMSGetErrorString(err); \n' - + ' var msg = "Commit Failed! Error Code: "+err; \n' + + ' var msg = "Commit Failed! Error Code: "+err; \n' + ' msg += " Error Description: " + errString; \n' + ' } \n' + ' document.otherForm.msgtxt.value = msg; \n' @@ -509,7 +509,7 @@ function UpdateLog(s) { + ' var result = doLMSGetValue(value); \n' + ' var err = doLMSGetLastError(); \n' + ' var errString = doLMSGetErrorString(err); \n' - + ' msg = "GetValue Returned: " + result; \n' + + ' msg = "GetValue Returned: " + result; \n' + ' msg += "\\nError Code: " + err; \n' + ' msg += "\\nError Description: " + errString; \n' + ' document.elemForm.msgtxt.value = msg; \n' @@ -524,14 +524,14 @@ function UpdateLog(s) { + ' var api = getAPIHandle(); \n' + ' if (api == null) { \n' + ' alert("Unable to locate the LMS\'s API Implementation.\\n"+ \n' - + ' "SetValue was not successful."); \n' + + ' "SetValue was not successful."); \n' + ' return false; \n' + ' } \n' + ' // Try to set the element \n' - + ' var result = api.SetValue( item, setValue ); \n' + + ' var result = api.SetValue( item, setValue ); \n' + ' var err = doLMSGetLastError(); \n' + ' var errString = doLMSGetErrorString(err); \n' - + ' msg = "SetValue returned: " + result; \n' + + ' msg = "SetValue returned: " + result; \n' + ' msg += "\\nError Code: " + err; \n' + ' msg += "\\nError Description: " + errString; \n' + ' document.elemForm.msgtxt.value = msg; \n' @@ -540,19 +540,19 @@ function UpdateLog(s) { + ' \n' + ' function tryLMSGetLastError() { \n' + ' var err = doLMSGetLastError(); \n' - + ' document.otherForm.msgtxt.value = "GetLastError returned Error Code: " + err; \n' + + ' document.otherForm.msgtxt.value = "GetLastError returned Error Code: " + err; \n' + ' } \n' + ' \n' + ' function tryLMSGetErrorString() { \n' + ' var err = doLMSGetLastError(); \n' + ' var errString = doLMSGetErrorString(err); \n' - + ' document.otherForm.msgtxt.value = "GetErrorString returned: " + errString; \n' + + ' document.otherForm.msgtxt.value = "GetErrorString returned: " + errString; \n' + ' } \n' + ' \n' + ' function tryLMSGetDiagnostic() { \n' + ' var err = doLMSGetLastError(); \n' + ' var diagnostic = doLMSGetDiagnostic(err); \n' - + ' document.otherForm.msgtxt.value = "GetDiagnostic returned: " + diagnostic; \n' + + ' document.otherForm.msgtxt.value = "GetDiagnostic returned: " + diagnostic; \n' + ' } \n' + ' \n' + '\n' @@ -565,7 +565,7 @@ function UpdateLog(s) { + ' ' + ' ' + ' ' + '
' - + ' ' + + ' ' + ' ' + ' ' @@ -588,10 +588,10 @@ function UpdateLog(s) { + ' ' + '
' + '
' - + '      Select API Function to Call        -- OR --  ' - + ' ' + '   ' -- 2.39.5