Skip to content

Commit

Permalink
deploy: b5833e4
Browse files Browse the repository at this point in the history
  • Loading branch information
its-ChaTTy committed Aug 24, 2024
1 parent 4818931 commit b419e1e
Show file tree
Hide file tree
Showing 1,364 changed files with 622,840 additions and 0 deletions.
59 changes: 59 additions & 0 deletions 372/APIWrapper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// SCORM API Wrapper
var findAPITries = 0;
var API = null;

function findAPI(win) {
while ((win.API == null) && (win.parent != null) && (win.parent != win)) {
findAPITries++;
if (findAPITries > 7) {
return null;
}
win = win.parent;
}
return win.API;
}

function getAPI() {
var theAPI = findAPI(window);
if ((theAPI == null) && (window.opener != null) && (typeof(window.opener) != "undefined")) {
theAPI = findAPI(window.opener);
}
if (theAPI == null) {
alert("Unable to find an API adapter");
}
return theAPI;
}

function initializeAPI() {
API = getAPI();
if (API != null) {
API.LMSInitialize("");
}
}

function terminateAPI() {
if (API != null) {
API.LMSFinish("");
}
}

function setProgress(progress) {
if (API != null) {
API.LMSSetValue("cmi.core.lesson_status", progress);
API.LMSCommit("");
}
}

function setSuspendData(data) {
if (API != null) {
API.LMSSetValue("cmi.suspend_data", data);
API.LMSCommit("");
}
}

function getSuspendData() {
if (API != null) {
return API.LMSGetValue("cmi.suspend_data");
}
return "";
}
Binary file added 372/BlueBar1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/Chinook_Sqlite.sqlite
Binary file not shown.
1 change: 1 addition & 0 deletions 372/NR
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
372
1 change: 1 addition & 0 deletions 372/REPO
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
its-ChaTTy/PyZombis
62 changes: 62 additions & 0 deletions 372/SCORMFunctions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// SCORM Functions

function loadPage() {
initializeAPI();
console.log("SCORM API initialized.");
}

function unloadPage() {
saveTextBoxData(); // Save data when the page is unloaded
terminateAPI();
console.log("SCORM API terminated.");
}

function loadChapter(chapter) {
loadPage();

var suspendData = getSuspendData();
if (suspendData) {
console.log("Suspend data retrieved:", suspendData);
// Restore the text data in the textbox
document.getElementById("chapter-textbox").value = suspendData;
}

var completionStatus = API.LMSGetValue("cmi.core.lesson_status");

if (completionStatus === "completed") {
document.getElementById("completion-status").innerText = "This chapter has been completed.";
document.getElementById("complete-button").style.display = "none";
} else {
document.getElementById("completion-status").innerText = "This chapter has not been completed.";
document.getElementById("reset-button").style.display = "none";
}
}

function completeChapter(chapter) {
setProgress("completed");
alert(chapter + " completed! Progress recorded.");
document.getElementById("completion-status").innerText = "This chapter has been completed.";
document.getElementById("complete-button").style.display = "none";
document.getElementById("reset-button").style.display = "block";

// Optionally save some suspend data when the chapter is completed
setSuspendData(document.getElementById("chapter-textbox").value);
}

function resetChapter(chapter) {
setProgress("incomplete");
alert(chapter + " reset to incomplete.");
document.getElementById("completion-status").innerText = "This chapter has not been completed.";
document.getElementById("complete-button").style.display = "block";
document.getElementById("reset-button").style.display = "none";

// Clear the suspend data if the chapter is reset
setSuspendData("");
document.getElementById("chapter-textbox").value = ""; // Clear the textbox as well
}

function saveTextBoxData() {
// Save the current state of the textbox into suspend data
var textBoxData = document.getElementById("chapter-textbox").value;
setSuspendData(textBoxData);
}
Binary file added 372/_images/TWP05_015.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP05_035.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP05_041.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP10_001.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP10_002.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP10_004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP10_009.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP10_011.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP15_001.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP15_002.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP15_007.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP15_007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP17_004.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP17_005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP17_006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP17_007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP18_015.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP18_016.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP18_017.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP18_018.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP30_001.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP30_002.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP30_004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP30_005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 372/_images/TWP30_006.jpg
Binary file added 372/_images/TWP30_009.jpg
Binary file added 372/_images/TWP30_0092.jpg
Binary file added 372/_images/TWP30_012.jpg
Binary file added 372/_images/TWP33_001.jpg
Binary file added 372/_images/TWP33_004.jpg
Binary file added 372/_images/TWP33_005.png
Binary file added 372/_images/TWP33_006.png
Binary file added 372/_images/TWP33_007.jpg
Binary file added 372/_images/TWP33_008.jpg
Binary file added 372/_images/TWP33_009.jpg
Binary file added 372/_images/TWP33_012.jpg
Binary file added 372/_images/TWP33_015.jpg
Binary file added 372/_images/TWP33_016.jpg
Binary file added 372/_images/TWP33_018.jpg
Binary file added 372/_images/TWP33_025.jpg
Binary file added 372/_images/TWP33_028.jpg
Binary file added 372/_images/TWP33_029.jpg
Binary file added 372/_images/TWP33_030.jpg
Binary file added 372/_images/TWP33_032.jpg
Binary file added 372/_images/TWP33_033.jpg
Binary file added 372/_images/TWP33_034.jpg
Binary file added 372/_images/TWP35_001.jpeg
Binary file added 372/_images/TWP35_002.jpeg
Binary file added 372/_images/TWP35_005.jpeg
Binary file added 372/_images/TWP37_001.jpeg
Binary file added 372/_images/TWP37_002.jpeg
Binary file added 372/_images/TWP37_003.jpeg
Binary file added 372/_images/TWP37_004.jpg
Binary file added 372/_images/TWP37_007.jpg
Binary file added 372/_images/TWP37_008.jpg
Binary file added 372/_images/TWP37_010.jpg
Binary file added 372/_images/TWP37_011.jpg
Binary file added 372/_images/TWP37_014.jpg
Binary file added 372/_images/TWP37_016.jpg
Binary file added 372/_images/TWP37_017.jpg
Binary file added 372/_images/TWP37_018.jpg
Binary file added 372/_images/TWP37_021.jpg
Binary file added 372/_images/TWP37_022.jpg
Binary file added 372/_images/TWP37_025.jpg
Binary file added 372/_images/TWP37_026.png
Binary file added 372/_images/TWP37_027.png
Binary file added 372/_images/TWP42_003.jpeg
Binary file added 372/_images/TWP42_004.jpeg
Binary file added 372/_images/TWP42_005.jpeg
Binary file added 372/_images/TWP42_009.png
Binary file added 372/_images/TWP45_001.jpeg
Binary file added 372/_images/TWP45_002.jpeg
Binary file added 372/_images/TWP45_050.png
Binary file added 372/_images/TWP47_001.png
Binary file added 372/_images/TWP47_002.png
Binary file added 372/_images/TWP47_004.jpg
Binary file added 372/_images/TWP47_005.png
Binary file added 372/_images/TWP47_006.png
Binary file added 372/_images/TWP47_007.png
Binary file added 372/_images/TWP47_008.jpg
Binary file added 372/_images/TWP47_011.jpg
Binary file added 372/_images/TWP47_015.png
Binary file added 372/_images/TWP47_017.png
Binary file added 372/_images/TWP47_018.png
Binary file added 372/_images/TWP47_020.png
Binary file added 372/_images/TWP47_021.png
Binary file added 372/_images/TWP50_003.png
Binary file added 372/_images/TWP50_004.png
Binary file added 372/_images/TWP50_006.png
Binary file added 372/_images/TWP50_007.jpg
Binary file added 372/_images/TWP50_008.jpg
Binary file added 372/_images/TWP50_013.jpg
Binary file added 372/_images/TWP50_017.jpg
Binary file added 372/_images/TWP52_001.jpg
Binary file added 372/_images/TWP52_005.jpg
Binary file added 372/_images/TWP52_006.jpg
Binary file added 372/_images/TWP52_007.png
Binary file added 372/_images/TWP52_008.jpg
Binary file added 372/_images/TWP52_009.jpg
Binary file added 372/_images/TWP52_013.jpg
Binary file added 372/_images/TWP52_014.png
Binary file added 372/_images/TWP52_016.jpg
Binary file added 372/_images/TWP52_017.png
Binary file added 372/_images/TWP52_020.jpg
Binary file added 372/_images/TWP54_001.jpg
Binary file added 372/_images/TWP54_002.jpg
Binary file added 372/_images/TWP54_003.jpg
Binary file added 372/_images/TWP54_004.jpg
Binary file added 372/_images/TWP54_005.jpg
Binary file added 372/_images/TWP54_007.jpg
Binary file added 372/_images/TWP54_009.jpg
Binary file added 372/_images/TWP54_010.jpg
Binary file added 372/_images/TWP56_001.jpg
Binary file added 372/_images/TWP56_003.jpg
Binary file added 372/_images/TWP56_005.jpg
Binary file added 372/_images/TWP56_008.jpg
Binary file added 372/_images/TWP56_010.jpg
Binary file added 372/_images/TWP58_002.jpeg
Binary file added 372/_images/TWP58_003.jpg
Binary file added 372/_images/TWP58_004.jpg
Binary file added 372/_images/TWP58_005.jpg
Binary file added 372/_images/TWP58_006.jpg
Binary file added 372/_images/TWP58_007.jpg
Binary file added 372/_images/TWP58_010.png
Binary file added 372/_images/TWP58_011.png
Binary file added 372/_images/TWP60_001.jpeg
Binary file added 372/_images/TWP60_002.jpeg
Binary file added 372/_images/TWP60_005.png
Binary file added 372/_images/TWP60_007.png
Binary file added 372/_images/TWP60_008.png
Binary file added 372/_images/TWP60_014.png
Binary file added 372/_images/TWP60_015.png
Binary file added 372/_images/TWP60_017.png
Binary file added 372/_images/TWP60_022.png
Binary file added 372/_images/TWP60_023.png
Binary file added 372/_images/TWP65_001.jpg
Binary file added 372/_images/TWP65_002.jpg
Loading

0 comments on commit b419e1e

Please sign in to comment.