From 7bb2265517d05eea12313f1bdce45f5f413e05c8 Mon Sep 17 00:00:00 2001 From: "Jakub (james) K" Date: Tue, 22 Oct 2024 15:11:03 +0200 Subject: [PATCH] mod --- index.html | 2 +- js/{script.js => skrypt.js} | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename js/{script.js => skrypt.js} (98%) 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