This commit is contained in:
james 2024-10-22 15:11:03 +02:00
parent 3dc9f06c61
commit 7bb2265517
2 changed files with 6 additions and 6 deletions

View File

@ -226,7 +226,7 @@
</footer> </footer>
<!-- Przeniesienie skryptu na koniec body --> <!-- Przeniesienie skryptu na koniec body -->
<script src="js/script.js"></script> <script src="js/skrypt.js"></script>
</body> </body>
</html> </html>

View File

@ -83,7 +83,7 @@ const classData = {};
// Funkcja do wczytania pliku class.json i danych uczniów // Funkcja do wczytania pliku class.json i danych uczniów
async function loadClasses() { async function loadClasses() {
const classFilePath = '/data/class.json'; const classFilePath = 'data/class.json';
const classes = await fetchJSONFile(classFilePath); const classes = await fetchJSONFile(classFilePath);
if (classes) { if (classes) {
@ -123,7 +123,7 @@ async function loadStudents(classFilePath) {
return; return;
} }
const studentsFilePath = `/data/${classFilePath}`; const studentsFilePath = `data/${classFilePath}`;
const data = await fetchJSONFile(studentsFilePath); const data = await fetchJSONFile(studentsFilePath);
if (data && Array.isArray(data.students)) { if (data && Array.isArray(data.students)) {
@ -148,7 +148,7 @@ async function loadStudents(classFilePath) {
} }
async function getCategoriesWithCriteria() { async function getCategoriesWithCriteria() {
const criteriaFilePath = '/data/criteria.json'; const criteriaFilePath = 'data/criteria.json';
const criteria = await fetchJSONFile(criteriaFilePath); const criteria = await fetchJSONFile(criteriaFilePath);
let categoriesWithCriteria = {} let categoriesWithCriteria = {}
@ -170,7 +170,7 @@ async function getCategoriesWithCriteria() {
// Funkcja do wczytania pliku criteria.json // Funkcja do wczytania pliku criteria.json
async function loadCriteria() { async function loadCriteria() {
const criteriaFilePath = '/data/criteria.json'; const criteriaFilePath = 'data/criteria.json';
const criteria = await fetchJSONFile(criteriaFilePath); const criteria = await fetchJSONFile(criteriaFilePath);
console.log("Załadowane kryteria:", criteria); console.log("Załadowane kryteria:", criteria);
@ -214,7 +214,7 @@ async function changeRole(role) {
const select = document.getElementById('select-role'); const select = document.getElementById('select-role');
const selectedValue = select.value; const selectedValue = select.value;
const criteriaFilePath = '/data/criteria.json'; const criteriaFilePath = 'data/criteria.json';
const criteria = await fetchJSONFile(criteriaFilePath); const criteria = await fetchJSONFile(criteriaFilePath);
currentRole = selectedValue currentRole = selectedValue