Файловый менеджер - Редактировать - /home/gqdcvggs/go.imators.com/notable.zip
Назад
PK �6�[벣 � data.jsonnu �Iw�� { "periodes": { "trimestre1": { "debut": "2024-09-01", "fin": "2024--31", "notes": [] }, "trimestre2": { "debut": "2024-04-10", "fin": "2024-20-12", "notes": [] }, "trimestre3": { "debut": "2024-09-01", "fin": "2024-12-31", "notes": [] } }, "matieres": { "Mathématiques": { "notes": [], "coefficient": 3, "professeur": "" }, "Français": { "notes": [], "coefficient": 3, "professeur": "" }, "Histoire-Géo": { "notes": [], "coefficient": 2, "professeur": "" }, "Anglais": { "notes": [], "coefficient": 2, "professeur": "" }, "SVT": { "notes": [], "coefficient": 2, "professeur": "" }, "Physique-Chimie": { "notes": [], "coefficient": 2, "professeur": "" } }, "echelle_notes": [ "Faible", "Insuffisant", "Suffisant", "Assez bien", "Bien", "Parfait", "Excellent" ], "settings": { "moyenne_passage": 3.5, "theme": "light", "nom_eleve": "", "classe": "" } }PK �6�[��|]�F �F index.htmlnu �Iw�� <!DOCTYPE html> <html lang="fr"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Notable Pro - Suivi Scolaire</title> <script src="https://cdn.tailwindcss.com"></script> </head> <body class="bg-gray-100"> <!-- Navigation --> <nav class="bg-white shadow-lg"> <div class="container mx-auto px-6 py-4"> <div class="flex items-center justify-between"> <div class="flex items-center"> <h1 class="text-2xl font-bold text-gray-800">Notable Pro</h1> </div> <div class="flex items-center space-x-4"> <select id="periodeSelect" class="border p-2 rounded"> <option value="trimestre1">1er Trimestre</option> <option value="trimestre2">2ème Trimestre</option> <option value="trimestre3">3ème Trimestre</option> </select> <button id="settingsBtn" class="p-2 rounded hover:bg-gray-100"> ⚙️ Paramètres </button> </div> </div> </div> </nav> <!-- Contenu Principal --> <div class="container mx-auto px-4 py-8"> <!-- Informations Élève --> <div class="bg-white rounded-lg shadow-lg p-6 mb-8"> <div class="flex justify-between items-center"> <div> <h2 class="text-xl font-bold" id="studentName">Élève : Non défini</h2> <p class="text-gray-600" id="className">Classe : Non définie</p> </div> <div class="text-right"> <p class="text-gray-600" id="currentPeriod">Période en cours</p> <p class="text-gray-600" id="periodDates">Dates: XX/XX/XXXX - XX/XX/XXXX</p> </div> </div> </div> <!-- Statistiques Globales --> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"> <!-- Moyenne Générale --> <div class="bg-white rounded-lg shadow-lg p-6"> <h3 class="text-lg font-semibold mb-4">Moyenne Générale</h3> <div class="text-4xl font-bold text-blue-600" id="globalAverage">--</div> <div class="mt-2 text-sm text-gray-600">Sur 7 points</div> </div> <!-- Pourcentage Global --> <div class="bg-white rounded-lg shadow-lg p-6"> <h3 class="text-lg font-semibold mb-4">Performance Globale</h3> <div class="text-4xl font-bold text-green-600" id="globalPercentage">--%</div> <div class="mt-2 text-sm text-gray-600" id="globalStatus">Status</div> </div> <!-- Meilleures Matières --> <div class="bg-white rounded-lg shadow-lg p-6"> <h3 class="text-lg font-semibold mb-4">Meilleure Matière</h3> <div class="text-xl font-bold text-blue-600" id="bestSubject">--</div> <div class="mt-2 text-sm text-gray-600" id="bestSubjectScore">--</div> </div> <!-- Total Notes --> <div class="bg-white rounded-lg shadow-lg p-6"> <h3 class="text-lg font-semibold mb-4">Notes Enregistrées</h3> <div class="text-4xl font-bold text-blue-600" id="totalNotes">0</div> <div class="mt-2 text-sm text-gray-600">Ce trimestre</div> </div> </div> <!-- Matières et Notes --> <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8"> <!-- Liste des Matières --> <div class="col-span-1"> <div class="bg-white rounded-lg shadow-lg p-6"> <h3 class="text-lg font-semibold mb-4">Matières</h3> <div id="subjectsList" class="space-y-2"> <!-- Les matières seront injectées ici --> </div> </div> </div> <!-- Formulaire d'ajout de note --> <div class="col-span-2"> <div class="bg-white rounded-lg shadow-lg p-6"> <h3 class="text-lg font-semibold mb-4">Ajouter une Note</h3> <form id="noteForm" class="space-y-4"> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700">Matière</label> <select name="matiere" required class="mt-1 block w-full rounded-md border-gray-300 shadow-sm"> <!-- Options injectées par JS --> </select> </div> <div> <label class="block text-sm font-medium text-gray-700">Note</label> <select name="note" required class="mt-1 block w-full rounded-md border-gray-300 shadow-sm"> <!-- Options injectées par JS --> </select> </div> </div> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div> <label class="block text-sm font-medium text-gray-700">Date</label> <input type="date" name="date" required class="mt-1 block w-full rounded-md border-gray-300 shadow-sm"> </div> <div> <label class="block text-sm font-medium text-gray-700">Commentaire</label> <input type="text" name="commentaire" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm"> </div> </div> <button type="submit" class="w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700"> Ajouter la note </button> </form> </div> </div> </div> <!-- Tableau des Notes --> <div class="bg-white rounded-lg shadow-lg p-6"> <div class="flex justify-between items-center mb-4"> <h3 class="text-lg font-semibold">Historique des Notes</h3> <div class="flex space-x-2"> <button id="exportBtn" class="px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700"> Exporter </button> <button id="printBtn" class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"> Imprimer </button> </div> </div> <div class="overflow-x-auto"> <table class="min-w-full"> <thead class="bg-gray-50"> <tr> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Date</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Matière</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Note</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Points</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Commentaire</th> <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Actions</th> </tr> </thead> <tbody id="notesTableBody" class="bg-white divide-y divide-gray-200"> <!-- Les notes seront injectées ici --> </tbody> </table> </div> </div> </div> <!-- Modal Paramètres --> <div id="settingsModal" class="hidden fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full"> <div class="relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white"> <h3 class="text-lg font-semibold mb-4">Paramètres</h3> <form id="settingsForm" class="space-y-4"> <div> <label class="block text-sm font-medium text-gray-700">Nom de l'élève</label> <input type="text" name="nom_eleve" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm"> </div> <div> <label class="block text-sm font-medium text-gray-700">Classe</label> <input type="text" name="classe" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm"> </div> <div> <label class="block text-sm font-medium text-gray-700">Thème</label> <select name="theme" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm"> <option value="light">Clair</option> <option value="dark">Sombre</option> </select> </div> <div class="flex justify-end space-x-2"> <button type="button" onclick="closeSettingsModal()" class="px-4 py-2 bg-gray-200 text-gray-800 rounded"> Annuler </button> <button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded"> Sauvegarder </button> </div> </form> </div> </div> <script> let data = null; let currentPeriode = 'trimestre1'; const noteValues = { 'Faible': 1, 'Insuffisant': 2, 'Suffisant': 3, 'Assez bien': 4, 'Bien': 5, 'Parfait': 6, 'Excellent': 7 }; async function loadData() { try { const response = await fetch('data.json'); data = await response.json(); if (!data) { throw new Error('Données non trouvées'); } updateUI(); initializeSelects(); updateStudentInfo(); } catch (error) { console.error('Erreur de chargement:', error); alert('Erreur lors du chargement des données'); } } function calculateAverage(notes) { if (!notes || notes.length === 0) return 0; const sum = notes.reduce((acc, note) => acc + noteValues[note.note], 0); return sum / notes.length; } function updateStudentInfo() { document.getElementById('studentName').textContent = `Élève : ${data.settings.nom_eleve || 'Non défini'}`; document.getElementById('className').textContent = `Classe : ${data.settings.classe || 'Non définie'}`; const periode = data.periodes[currentPeriode]; document.getElementById('currentPeriod').textContent = `${currentPeriode.replace(/[0-9]/g, ' $&')}`; document.getElementById('periodDates').textContent = `Du ${new Date(periode.debut).toLocaleDateString()} au ${new Date(periode.fin).toLocaleDateString()}`; } function updateGlobalStats() { const periodNotes = data.periodes[currentPeriode].notes; const average = calculateAverage(periodNotes); const percentage = ((average / 7) * 100).toFixed(1); document.getElementById('globalAverage').textContent = average.toFixed(2); document.getElementById('globalPercentage').textContent = `${percentage}%`; document.getElementById('totalNotes').textContent = periodNotes.length; const status = document.getElementById('globalStatus'); status.textContent = average > data.settings.moyenne_passage ? 'Au-dessus de la moyenne' : 'En dessous de la moyenne'; status.className = `mt-2 text-sm ${average > data.settings.moyenne_passage ? 'text-green-600' : 'text-red-600'}`; updateBestSubject(); } function updateBestSubject() { const matiereAverages = Object.entries(data.matieres).map(([matiere, data]) => { const avg = calculateAverage(data.notes); return { matiere, moyenne: avg }; }); const bestSubject = matiereAverages.reduce((prev, current) => { return (prev.moyenne > current.moyenne) ? prev : current; }); if (bestSubject.moyenne > 0) { document.getElementById('bestSubject').textContent = bestSubject.matiere; document.getElementById('bestSubjectScore').textContent = `Moyenne: ${bestSubject.moyenne.toFixed(2)}/7`; } } function updateSubjectsList() { const subjectsList = document.getElementById('subjectsList'); subjectsList.innerHTML = ''; Object.entries(data.matieres).forEach(([matiere, matiereData]) => { const moyenne = calculateAverage(matiereData.notes); const percentage = ((moyenne / 7) * 100).toFixed(1); const element = document.createElement('div'); element.className = 'p-4 border rounded hover:bg-gray-50'; element.innerHTML = ` <div class="flex justify-between items-center"> <div> <h4 class="font-medium">${matiere}</h4> <p class="text-sm text-gray-500">Coef. ${matiereData.coefficient}</p> </div> <div class="text-right"> <p class="text-lg font-bold ${moyenne > data.settings.moyenne_passage ? 'text-green-600' : 'text-red-600'}"> ${percentage}% </p> <p class="text-sm text-gray-500">${matiereData.notes.length} note(s)</p> </div> </div> `; subjectsList.appendChild(element); }); } function updateNotesTable() { const tbody = document.getElementById('notesTableBody'); tbody.innerHTML = ''; const periodNotes = data.periodes[currentPeriode].notes; periodNotes.sort((a, b) => new Date(b.date) - new Date(a.date)); periodNotes.forEach((note, index) => { const row = document.createElement('tr'); row.innerHTML = ` <td class="px-6 py-4 whitespace-nowrap">${new Date(note.date).toLocaleDateString()}</td> <td class="px-6 py-4">${note.matiere}</td> <td class="px-6 py-4">${note.note}</td> <td class="px-6 py-4">${noteValues[note.note]}/7</td> <td class="px-6 py-4">${note.commentaire || '-'}</td> <td class="px-6 py-4"> <button onclick="deleteNote(${index})" class="text-red-600 hover:text-red-800"> Supprimer </button> </td> `; tbody.appendChild(row); }); } function updateUI() { updateStudentInfo(); updateGlobalStats(); updateSubjectsList(); updateNotesTable(); } function initializeSelects() { const matiereSelect = document.querySelector('select[name="matiere"]'); const noteSelect = document.querySelector('select[name="note"]'); matiereSelect.innerHTML = '<option value="">Choisir une matière</option>' + Object.keys(data.matieres).map(matiere => `<option value="${matiere}">${matiere}</option>` ).join(''); noteSelect.innerHTML = '<option value="">Choisir une note</option>' + data.echelle_notes.map(note => `<option value="${note}">${note}</option>` ).join(''); } function deleteNote(index) { if (confirm('Êtes-vous sûr de vouloir supprimer cette note ?')) { const note = data.periodes[currentPeriode].notes[index]; data.periodes[currentPeriode].notes.splice(index, 1); const matiereNotes = data.matieres[note.matiere].notes; const matiereIndex = matiereNotes.findIndex(n => n.date === note.date && n.note === note.note ); if (matiereIndex !== -1) { matiereNotes.splice(matiereIndex, 1); } saveData(); updateUI(); } } function saveData() { localStorage.setItem('notable_data', JSON.stringify(data)); } function showSettingsModal() { document.getElementById('settingsModal').classList.remove('hidden'); const form = document.getElementById('settingsForm'); form.nom_eleve.value = data.settings.nom_eleve; form.classe.value = data.settings.classe; form.theme.value = data.settings.theme; } function closeSettingsModal() { document.getElementById('settingsModal').classList.add('hidden'); } document.getElementById('settingsBtn').addEventListener('click', showSettingsModal); document.getElementById('settingsForm').addEventListener('submit', function(e) { e.preventDefault(); data.settings.nom_eleve = this.nom_eleve.value; data.settings.classe = this.classe.value; data.settings.theme = this.theme.value; saveData(); updateUI(); closeSettingsModal(); }); document.getElementById('noteForm').addEventListener('submit', function(e) { e.preventDefault(); const newNote = { date: this.date.value, matiere: this.matiere.value, note: this.note.value, commentaire: this.commentaire.value }; data.periodes[currentPeriode].notes.push(newNote); data.matieres[newNote.matiere].notes.push(newNote); saveData(); updateUI(); this.reset(); }); document.getElementById('periodeSelect').addEventListener('change', function(e) { currentPeriode = e.target.value; updateUI(); }); document.getElementById('exportBtn').addEventListener('click', function() { const dataStr = JSON.stringify(data, null, 2); const blob = new Blob([dataStr], { type: 'application/json' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'notable_export.json'; a.click(); }); document.getElementById('printBtn').addEventListener('click', function() { window.print(); }); window.addEventListener('load', loadData); </script> </body> </html>PK �6�[벣 � data.jsonnu �Iw�� PK �6�[��|]�F �F � index.htmlnu �Iw�� PK � M
| ver. 1.6 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка