diff --git a/index.html b/index.html index 5c09985..c76a8c7 100644 --- a/index.html +++ b/index.html @@ -226,7 +226,7 @@ - + diff --git a/js/script.js b/js/skrypt.js similarity index 98% rename from js/script.js rename to js/skrypt.js index 46c1cb2..6e814c0 100644 --- a/js/script.js +++ b/js/skrypt.js @@ -83,7 +83,7 @@ const classData = {}; // Funkcja do wczytania pliku class.json i danych uczniów async function loadClasses() { - const classFilePath = '/data/class.json'; + const classFilePath = 'data/class.json'; const classes = await fetchJSONFile(classFilePath); if (classes) { @@ -123,7 +123,7 @@ async function loadStudents(classFilePath) { return; } - const studentsFilePath = `/data/${classFilePath}`; + const studentsFilePath = `data/${classFilePath}`; const data = await fetchJSONFile(studentsFilePath); if (data && Array.isArray(data.students)) { @@ -148,7 +148,7 @@ async function loadStudents(classFilePath) { } async function getCategoriesWithCriteria() { - const criteriaFilePath = '/data/criteria.json'; + const criteriaFilePath = 'data/criteria.json'; const criteria = await fetchJSONFile(criteriaFilePath); let categoriesWithCriteria = {} @@ -170,7 +170,7 @@ async function getCategoriesWithCriteria() { // Funkcja do wczytania pliku criteria.json async function loadCriteria() { - const criteriaFilePath = '/data/criteria.json'; + const criteriaFilePath = 'data/criteria.json'; const criteria = await fetchJSONFile(criteriaFilePath); console.log("Załadowane kryteria:", criteria); @@ -214,7 +214,7 @@ async function changeRole(role) { const select = document.getElementById('select-role'); const selectedValue = select.value; - const criteriaFilePath = '/data/criteria.json'; + const criteriaFilePath = 'data/criteria.json'; const criteria = await fetchJSONFile(criteriaFilePath); currentRole = selectedValue