Upload folder using huggingface_hub
Browse files- index-old4.html +0 -0
- index.html +1307 -178
index-old4.html
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
index.html
CHANGED
|
@@ -1831,6 +1831,8 @@
|
|
| 1831 |
<option value="conjugaison">Conjugaison française</option>
|
| 1832 |
<option value="grammaire">Grammaire française</option>
|
| 1833 |
<option value="vocabulaire">Vocabulaire français</option>
|
|
|
|
|
|
|
| 1834 |
</select>
|
| 1835 |
</div>
|
| 1836 |
<div class="form-col">
|
|
@@ -1847,11 +1849,11 @@
|
|
| 1847 |
<div class="form-row">
|
| 1848 |
<div class="form-col">
|
| 1849 |
<label class="form-label"><i class="fas fa-calendar-start"></i> Date de Début</label>
|
| 1850 |
-
<input type="date" id="start" class="form-control" value="
|
| 1851 |
</div>
|
| 1852 |
<div class="form-col">
|
| 1853 |
<label class="form-label"><i class="fas fa-calendar-end"></i> Date de Fin</label>
|
| 1854 |
-
<input type="date" id="end" class="form-control" value="
|
| 1855 |
</div>
|
| 1856 |
</div>
|
| 1857 |
|
|
@@ -1865,6 +1867,54 @@
|
|
| 1865 |
</select>
|
| 1866 |
</div>
|
| 1867 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1868 |
<!-- Qualité Estimée -->
|
| 1869 |
<div class="form-group">
|
| 1870 |
<label class="form-label"><i class="fas fa-chart-line"></i> Qualité Estimée de Rétention</label>
|
|
@@ -1963,6 +2013,42 @@
|
|
| 1963 |
<div class="progress-fill" id="progressFill" style="width: 33%"></div>
|
| 1964 |
</div>
|
| 1965 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1966 |
</div>
|
| 1967 |
</div>
|
| 1968 |
</section>
|
|
@@ -1972,21 +2058,51 @@
|
|
| 1972 |
<div class="card">
|
| 1973 |
<div class="card-header">
|
| 1974 |
<h3><i class="fas fa-book"></i> Journal d'Apprentissage Autorégulé</h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1975 |
</div>
|
| 1976 |
|
| 1977 |
<div class="form-group">
|
| 1978 |
-
<label class="form-label"><i class="fas fa-
|
| 1979 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1980 |
</div>
|
| 1981 |
|
| 1982 |
<div class="form-group">
|
| 1983 |
-
<label class="form-label"><i class="fas fa-lightbulb"></i>
|
| 1984 |
-
<textarea id="
|
| 1985 |
</div>
|
| 1986 |
|
| 1987 |
<button class="btn btn-primary btn-large" onclick="saveJournal()">
|
| 1988 |
<i class="fas fa-save"></i> Sauvegarder l'Entrée
|
| 1989 |
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1990 |
</div>
|
| 1991 |
</section>
|
| 1992 |
|
|
@@ -1994,12 +2110,22 @@
|
|
| 1994 |
<section id="notifications" class="tab-content">
|
| 1995 |
<div class="card">
|
| 1996 |
<div class="card-header">
|
| 1997 |
-
<h3><i class="fas fa-bell"></i> Notifications Intelligentes</h3>
|
|
|
|
|
|
|
|
|
|
| 1998 |
</div>
|
| 1999 |
|
| 2000 |
<div id="notificationContainer">
|
| 2001 |
<div class="notification-card">
|
| 2002 |
-
<p><i class="fas fa-info-circle"></i>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2003 |
</div>
|
| 2004 |
</div>
|
| 2005 |
</div>
|
|
@@ -2010,9 +2136,12 @@
|
|
| 2010 |
<div class="card">
|
| 2011 |
<div class="card-header">
|
| 2012 |
<h3><i class="fas fa-chart-line"></i> Tableau de Bord d'Apprentissage</h3>
|
|
|
|
|
|
|
|
|
|
| 2013 |
</div>
|
| 2014 |
|
| 2015 |
-
<div class="stats-grid">
|
| 2016 |
<div class="stat-card">
|
| 2017 |
<div class="stat-value">12</div>
|
| 2018 |
<div class="stat-label">Sessions Complétées</div>
|
|
@@ -2025,6 +2154,121 @@
|
|
| 2025 |
<div class="stat-value">7</div>
|
| 2026 |
<div class="stat-label">Jours d'Activité</div>
|
| 2027 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2028 |
</div>
|
| 2029 |
</div>
|
| 2030 |
</section>
|
|
@@ -2037,21 +2281,42 @@
|
|
| 2037 |
</div>
|
| 2038 |
|
| 2039 |
<div class="questionnaire-section">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2040 |
<h4><i class="fas fa-info-circle"></i> Qu'est-ce que l'algorithme SM-2 ?</h4>
|
| 2041 |
<p>L'algorithme SM-2 est un système de répétition espacée développé pour optimiser la mémorisation à long terme.</p>
|
| 2042 |
|
| 2043 |
<h4 style="margin-top: 20px;"><i class="fas fa-chart-line"></i> Comment ça marche ?</h4>
|
| 2044 |
-
<ul>
|
| 2045 |
<li>Plus vous connaissez bien une information, plus l'intervalle de révision augmente</li>
|
| 2046 |
<li>Les intervalles typiques sont: 1 jour, 3 jours, 7 jours, 14 jours, etc.</li>
|
| 2047 |
<li>Le système s'adapte à vos performances</li>
|
| 2048 |
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2049 |
</div>
|
| 2050 |
</div>
|
| 2051 |
</section>
|
| 2052 |
</div>
|
| 2053 |
|
| 2054 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2055 |
// Variables pour le profil
|
| 2056 |
let learnerProfile = {
|
| 2057 |
bigFive: {
|
|
@@ -2079,16 +2344,140 @@
|
|
| 2079 |
}
|
| 2080 |
};
|
| 2081 |
|
| 2082 |
-
// Variables pour
|
| 2083 |
-
let
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2084 |
|
| 2085 |
-
// Initialisation
|
| 2086 |
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
| 2087 |
updateProfileProgress();
|
| 2088 |
updateProfileSummary();
|
| 2089 |
createMotivationChart();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2090 |
});
|
| 2091 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2092 |
// Vérifier si toutes les questions d'une section sont répondues
|
| 2093 |
function checkSectionCompletion(sectionId) {
|
| 2094 |
const section = document.getElementById(sectionId);
|
|
@@ -2206,7 +2595,6 @@
|
|
| 2206 |
const totalSections = sections.length;
|
| 2207 |
|
| 2208 |
const percentage = Math.round((completedCount / totalSections) * 100);
|
| 2209 |
-
profileCompletionPercentage = percentage;
|
| 2210 |
|
| 2211 |
// Mettre à jour la barre de progression
|
| 2212 |
document.getElementById('profileCompletion').textContent = `${percentage}%`;
|
|
@@ -2300,33 +2688,49 @@
|
|
| 2300 |
|
| 2301 |
// Compléter automatiquement toutes les sections
|
| 2302 |
function completeAllSections() {
|
| 2303 |
-
//
|
| 2304 |
-
const
|
| 2305 |
-
|
| 2306 |
-
|
| 2307 |
-
|
| 2308 |
-
|
| 2309 |
-
|
| 2310 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2311 |
|
| 2312 |
-
|
| 2313 |
-
|
| 2314 |
-
|
| 2315 |
-
|
| 2316 |
-
|
| 2317 |
-
|
| 2318 |
-
|
| 2319 |
-
|
| 2320 |
-
|
| 2321 |
-
|
| 2322 |
}
|
| 2323 |
});
|
| 2324 |
|
| 2325 |
-
//
|
| 2326 |
-
|
| 2327 |
-
|
| 2328 |
});
|
| 2329 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2330 |
showNotification('Toutes les sections ont été complétées automatiquement !', 'success');
|
| 2331 |
}
|
| 2332 |
|
|
@@ -2388,14 +2792,6 @@
|
|
| 2388 |
});
|
| 2389 |
}
|
| 2390 |
|
| 2391 |
-
// Recommandations basées sur les habitudes
|
| 2392 |
-
if (learnerProfile.habits.study_hours >= 4) {
|
| 2393 |
-
recommendations.push({
|
| 2394 |
-
icon: '⚠️',
|
| 2395 |
-
text: 'Trop d\'heures d\'étude peuvent mener au burnout. Équilibrez avec des pauses régulières.'
|
| 2396 |
-
});
|
| 2397 |
-
}
|
| 2398 |
-
|
| 2399 |
// Mettre à jour l'affichage des recommandations
|
| 2400 |
updateRecommendationsDisplay(recommendations);
|
| 2401 |
}
|
|
@@ -2405,127 +2801,319 @@
|
|
| 2405 |
const container = document.querySelector('.recommendations-section');
|
| 2406 |
let html = '<h4><i class="fas fa-lightbulb"></i> Recommandations Personnalisées Basées sur Votre Profil</h4>';
|
| 2407 |
|
| 2408 |
-
|
| 2409 |
html += `
|
| 2410 |
<div class="recommendation-item">
|
| 2411 |
-
<div class="recommendation-icon">
|
| 2412 |
-
<div>
|
| 2413 |
</div>
|
| 2414 |
`;
|
| 2415 |
-
}
|
| 2416 |
-
recommendations.forEach(rec => {
|
| 2417 |
-
html += `
|
| 2418 |
-
<div class="recommendation-item">
|
| 2419 |
-
<div class="recommendation-icon">${rec.icon}</div>
|
| 2420 |
-
<div>${rec.text}</div>
|
| 2421 |
-
</div>
|
| 2422 |
-
`;
|
| 2423 |
-
});
|
| 2424 |
-
}
|
| 2425 |
|
| 2426 |
container.innerHTML = html;
|
| 2427 |
}
|
| 2428 |
|
| 2429 |
-
//
|
| 2430 |
-
|
| 2431 |
-
|
| 2432 |
-
|
| 2433 |
-
|
| 2434 |
-
|
| 2435 |
-
|
| 2436 |
-
|
| 2437 |
-
|
| 2438 |
-
|
| 2439 |
-
|
| 2440 |
-
notification.style.cssText = `
|
| 2441 |
-
position: fixed;
|
| 2442 |
-
top: 20px;
|
| 2443 |
-
right: 20px;
|
| 2444 |
-
background: white;
|
| 2445 |
-
color: ${colors[type]};
|
| 2446 |
-
padding: 1rem 1.5rem;
|
| 2447 |
-
border-radius: 10px;
|
| 2448 |
-
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
|
| 2449 |
-
border-left: 4px solid ${colors[type]};
|
| 2450 |
-
z-index: 1000;
|
| 2451 |
-
animation: slideIn 0.3s ease;
|
| 2452 |
-
`;
|
| 2453 |
-
|
| 2454 |
-
notification.innerHTML = `
|
| 2455 |
-
<div style="display: flex; align-items: center; gap: 10px;">
|
| 2456 |
-
<i class="fas fa-${type === 'success' ? 'check-circle' : type === 'error' ? 'exclamation-circle' : type === 'warning' ? 'exclamation-triangle' : 'info-circle'}"></i>
|
| 2457 |
-
<div>${message}</div>
|
| 2458 |
-
</div>
|
| 2459 |
-
`;
|
| 2460 |
-
|
| 2461 |
-
document.body.appendChild(notification);
|
| 2462 |
-
|
| 2463 |
-
// Supprimer après 3 secondes
|
| 2464 |
-
setTimeout(() => {
|
| 2465 |
-
notification.style.animation = 'slideIn 0.3s ease reverse';
|
| 2466 |
-
setTimeout(() => notification.remove(), 300);
|
| 2467 |
-
}, 3000);
|
| 2468 |
}
|
| 2469 |
|
| 2470 |
-
//
|
| 2471 |
-
function
|
| 2472 |
-
|
| 2473 |
-
|
|
|
|
| 2474 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2475 |
|
| 2476 |
-
|
| 2477 |
-
|
|
|
|
| 2478 |
});
|
| 2479 |
-
|
| 2480 |
-
|
| 2481 |
-
|
| 2482 |
-
document.querySelectorAll('.nav-tab').forEach(tab => {
|
| 2483 |
-
if (tab.textContent.includes(getTabName(tabId))) {
|
| 2484 |
-
tab.classList.add('active');
|
| 2485 |
-
}
|
| 2486 |
});
|
| 2487 |
}
|
| 2488 |
|
| 2489 |
-
function
|
| 2490 |
-
const
|
| 2491 |
-
|
| 2492 |
-
'objectif': 'Objectif',
|
| 2493 |
-
'planner': 'Planner',
|
| 2494 |
-
'flashcards': 'Flashcards',
|
| 2495 |
-
'journal': 'Journal',
|
| 2496 |
-
'notifications': 'Notifications',
|
| 2497 |
-
'stats': 'Statistiques',
|
| 2498 |
-
'learn': 'Apprendre'
|
| 2499 |
-
};
|
| 2500 |
-
return names[tabId] || '';
|
| 2501 |
}
|
| 2502 |
|
| 2503 |
-
//
|
| 2504 |
-
|
| 2505 |
-
|
| 2506 |
-
{
|
| 2507 |
-
|
| 2508 |
-
|
| 2509 |
-
|
| 2510 |
-
|
| 2511 |
-
|
| 2512 |
-
|
| 2513 |
-
|
| 2514 |
-
|
| 2515 |
-
|
| 2516 |
-
|
| 2517 |
-
|
| 2518 |
-
|
| 2519 |
-
|
| 2520 |
-
|
| 2521 |
-
|
| 2522 |
-
|
| 2523 |
-
|
| 2524 |
-
|
| 2525 |
-
|
|
|
|
|
|
|
|
|
|
| 2526 |
}
|
| 2527 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2528 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2529 |
function flipCard() {
|
| 2530 |
const front = document.getElementById('flashcardFront');
|
| 2531 |
const back = document.getElementById('flashcardBack');
|
|
@@ -2541,60 +3129,601 @@
|
|
| 2541 |
}
|
| 2542 |
}
|
| 2543 |
|
|
|
|
| 2544 |
function rateCard(rating) {
|
| 2545 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2546 |
currentFlashcardIndex = (currentFlashcardIndex + 1) % flashcards.length;
|
| 2547 |
displayFlashcard(currentFlashcardIndex);
|
| 2548 |
}
|
| 2549 |
|
| 2550 |
-
|
| 2551 |
-
|
| 2552 |
-
|
| 2553 |
-
|
| 2554 |
-
|
| 2555 |
-
document.getElementById('flashcardCategory').textContent = card.category.charAt(0).toUpperCase() + card.category.slice(1);
|
| 2556 |
-
document.getElementById('flashcardDifficulty').textContent = card.difficulty.charAt(0).toUpperCase() + card.difficulty.slice(1);
|
| 2557 |
|
| 2558 |
-
|
| 2559 |
-
|
| 2560 |
-
|
|
|
|
|
|
|
|
|
|
| 2561 |
|
| 2562 |
-
|
| 2563 |
-
|
| 2564 |
-
document.getElementById('flashcard').classList.remove('flipped');
|
| 2565 |
}
|
| 2566 |
|
| 2567 |
-
//
|
| 2568 |
-
function
|
| 2569 |
-
document.
|
| 2570 |
-
|
| 2571 |
-
|
| 2572 |
-
document.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2573 |
|
| 2574 |
-
|
| 2575 |
-
|
| 2576 |
-
|
| 2577 |
-
|
| 2578 |
-
|
| 2579 |
-
|
| 2580 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2581 |
}
|
| 2582 |
|
| 2583 |
-
|
| 2584 |
-
|
| 2585 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2586 |
}
|
| 2587 |
|
| 2588 |
-
|
| 2589 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2590 |
}
|
| 2591 |
|
|
|
|
| 2592 |
function saveJournal() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2593 |
showNotification('Journal sauvegardé avec succès !', 'success');
|
| 2594 |
}
|
| 2595 |
|
| 2596 |
-
//
|
| 2597 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2598 |
</script>
|
| 2599 |
</body>
|
| 2600 |
</html>
|
|
|
|
| 1831 |
<option value="conjugaison">Conjugaison française</option>
|
| 1832 |
<option value="grammaire">Grammaire française</option>
|
| 1833 |
<option value="vocabulaire">Vocabulaire français</option>
|
| 1834 |
+
<option value="expression_ecrite">Expression écrite</option>
|
| 1835 |
+
<option value="comprehension_orale">Compréhension orale</option>
|
| 1836 |
</select>
|
| 1837 |
</div>
|
| 1838 |
<div class="form-col">
|
|
|
|
| 1849 |
<div class="form-row">
|
| 1850 |
<div class="form-col">
|
| 1851 |
<label class="form-label"><i class="fas fa-calendar-start"></i> Date de Début</label>
|
| 1852 |
+
<input type="date" id="start" class="form-control" value="2024-01-15">
|
| 1853 |
</div>
|
| 1854 |
<div class="form-col">
|
| 1855 |
<label class="form-label"><i class="fas fa-calendar-end"></i> Date de Fin</label>
|
| 1856 |
+
<input type="date" id="end" class="form-control" value="2024-12-31">
|
| 1857 |
</div>
|
| 1858 |
</div>
|
| 1859 |
|
|
|
|
| 1867 |
</select>
|
| 1868 |
</div>
|
| 1869 |
|
| 1870 |
+
<!-- Habitudes Productivité -->
|
| 1871 |
+
<div class="form-group">
|
| 1872 |
+
<label class="form-label"><i class="fas fa-chart-line"></i> Méthode Productivité</label>
|
| 1873 |
+
<div class="productivity-options">
|
| 1874 |
+
<div class="productivity-option selected" onclick="selectProductivityMethod('pomodoro')">
|
| 1875 |
+
<span class="productivity-icon">🍅</span>
|
| 1876 |
+
<div>Pomodoro</div>
|
| 1877 |
+
<small>25 min travail / 5 min pause</small>
|
| 1878 |
+
</div>
|
| 1879 |
+
<div class="productivity-option" onclick="selectProductivityMethod('deepwork')">
|
| 1880 |
+
<span class="productivity-icon">⏳</span>
|
| 1881 |
+
<div>Deep Work</div>
|
| 1882 |
+
<small>90 min focus intense</small>
|
| 1883 |
+
</div>
|
| 1884 |
+
</div>
|
| 1885 |
+
</div>
|
| 1886 |
+
|
| 1887 |
+
<!-- Type d'Énergie -->
|
| 1888 |
+
<div class="form-group">
|
| 1889 |
+
<label class="form-label"><i class="fas fa-sun"></i> Type d'Énergie</label>
|
| 1890 |
+
<div class="energy-patterns">
|
| 1891 |
+
<div class="energy-pattern selected" onclick="selectEnergyPattern('morning')">
|
| 1892 |
+
<div>🌅 Matinale</div>
|
| 1893 |
+
<small>Meilleure concentration le matin</small>
|
| 1894 |
+
</div>
|
| 1895 |
+
<div class="energy-pattern" onclick="selectEnergyPattern('evening')">
|
| 1896 |
+
<div>🌙 Vespérale</div>
|
| 1897 |
+
<small>Plus productif en soirée</small>
|
| 1898 |
+
</div>
|
| 1899 |
+
<div class="energy-pattern" onclick="selectEnergyPattern('flexible')">
|
| 1900 |
+
<div>🔄 Flexible</div>
|
| 1901 |
+
<small>Adaptable selon le jour</small>
|
| 1902 |
+
</div>
|
| 1903 |
+
</div>
|
| 1904 |
+
</div>
|
| 1905 |
+
|
| 1906 |
+
<!-- Créneaux Disponibles -->
|
| 1907 |
+
<div class="form-group">
|
| 1908 |
+
<label class="form-label"><i class="fas fa-calendar-check"></i> Créneaux Disponibles</label>
|
| 1909 |
+
<div class="time-slots">
|
| 1910 |
+
<div class="time-slot selected" onclick="toggleTimeSlot('morning')">08:00-10:00</div>
|
| 1911 |
+
<div class="time-slot" onclick="toggleTimeSlot('late_morning')">10:00-12:00</div>
|
| 1912 |
+
<div class="time-slot" onclick="toggleTimeSlot('afternoon')">14:00-16:00</div>
|
| 1913 |
+
<div class="time-slot" onclick="toggleTimeSlot('late_afternoon')">16:00-18:00</div>
|
| 1914 |
+
<div class="time-slot" onclick="toggleTimeSlot('evening')">19:00-21:00</div>
|
| 1915 |
+
</div>
|
| 1916 |
+
</div>
|
| 1917 |
+
|
| 1918 |
<!-- Qualité Estimée -->
|
| 1919 |
<div class="form-group">
|
| 1920 |
<label class="form-label"><i class="fas fa-chart-line"></i> Qualité Estimée de Rétention</label>
|
|
|
|
| 2013 |
<div class="progress-fill" id="progressFill" style="width: 33%"></div>
|
| 2014 |
</div>
|
| 2015 |
</div>
|
| 2016 |
+
|
| 2017 |
+
<div class="flashcard-section">
|
| 2018 |
+
<h4><i class="fas fa-plus-circle"></i> Ajouter une Nouvelle Flashcard</h4>
|
| 2019 |
+
<div class="form-row">
|
| 2020 |
+
<div class="form-col">
|
| 2021 |
+
<label class="form-label"><i class="fas fa-question"></i> Question</label>
|
| 2022 |
+
<textarea id="newQuestion" class="form-control" rows="2" placeholder="Entrez la question..."></textarea>
|
| 2023 |
+
</div>
|
| 2024 |
+
<div class="form-col">
|
| 2025 |
+
<label class="form-label"><i class="fas fa-lightbulb"></i> Réponse</label>
|
| 2026 |
+
<textarea id="newAnswer" class="form-control" rows="2" placeholder="Entrez la réponse..."></textarea>
|
| 2027 |
+
</div>
|
| 2028 |
+
</div>
|
| 2029 |
+
<div class="form-row">
|
| 2030 |
+
<div class="form-col">
|
| 2031 |
+
<label class="form-label"><i class="fas fa-tag"></i> Catégorie</label>
|
| 2032 |
+
<select id="newCategory" class="form-control">
|
| 2033 |
+
<option value="conjugaison">Conjugaison</option>
|
| 2034 |
+
<option value="grammaire">Grammaire</option>
|
| 2035 |
+
<option value="vocabulaire">Vocabulaire</option>
|
| 2036 |
+
<option value="expression_ecrite">Expression écrite</option>
|
| 2037 |
+
</select>
|
| 2038 |
+
</div>
|
| 2039 |
+
<div class="form-col">
|
| 2040 |
+
<label class="form-label"><i class="fas fa-star"></i> Difficulté</label>
|
| 2041 |
+
<select id="newDifficulty" class="form-control">
|
| 2042 |
+
<option value="facile">Facile</option>
|
| 2043 |
+
<option value="moyen" selected>Moyen</option>
|
| 2044 |
+
<option value="difficile">Difficile</option>
|
| 2045 |
+
</select>
|
| 2046 |
+
</div>
|
| 2047 |
+
</div>
|
| 2048 |
+
<button class="btn btn-primary" onclick="addNewFlashcard()">
|
| 2049 |
+
<i class="fas fa-plus"></i> Ajouter la Flashcard
|
| 2050 |
+
</button>
|
| 2051 |
+
</div>
|
| 2052 |
</div>
|
| 2053 |
</div>
|
| 2054 |
</section>
|
|
|
|
| 2058 |
<div class="card">
|
| 2059 |
<div class="card-header">
|
| 2060 |
<h3><i class="fas fa-book"></i> Journal d'Apprentissage Autorégulé</h3>
|
| 2061 |
+
<button class="btn btn-secondary" onclick="loadJournalEntries()">
|
| 2062 |
+
<i class="fas fa-history"></i> Historique
|
| 2063 |
+
</button>
|
| 2064 |
+
</div>
|
| 2065 |
+
|
| 2066 |
+
<div class="form-row">
|
| 2067 |
+
<div class="form-col">
|
| 2068 |
+
<label class="form-label"><i class="fas fa-tasks"></i> Planifié (To-Do)</label>
|
| 2069 |
+
<textarea id="todo" class="form-control" rows="3" placeholder="Ce que vous prévoyez d'apprendre..."></textarea>
|
| 2070 |
+
</div>
|
| 2071 |
+
<div class="form-col">
|
| 2072 |
+
<label class="form-label"><i class="fas fa-spinner"></i> En Cours (Doing)</label>
|
| 2073 |
+
<textarea id="doing" class="form-control" rows="3" placeholder="Ce que vous faites actuellement..."></textarea>
|
| 2074 |
+
</div>
|
| 2075 |
+
</div>
|
| 2076 |
+
|
| 2077 |
+
<div class="form-group">
|
| 2078 |
+
<label class="form-label"><i class="fas fa-check-circle"></i> Accompli (Done)</label>
|
| 2079 |
+
<textarea id="done" class="form-control" rows="3" placeholder="Ce que vous avez accompli..."></textarea>
|
| 2080 |
</div>
|
| 2081 |
|
| 2082 |
<div class="form-group">
|
| 2083 |
+
<label class="form-label"><i class="fas fa-star"></i> Auto-évaluation (1-5)</label>
|
| 2084 |
+
<div class="quality-indicator">
|
| 2085 |
+
<div class="quality-dot" onclick="setEvaluation(1)" style="background: linear-gradient(135deg, #ef4444, #dc2626);">1</div>
|
| 2086 |
+
<div class="quality-dot" onclick="setEvaluation(2)" style="background: linear-gradient(135deg, #f59e0b, #d97706);">2</div>
|
| 2087 |
+
<div class="quality-dot active" onclick="setEvaluation(3)" style="background: linear-gradient(135deg, #10b981, #059669);">3</div>
|
| 2088 |
+
<div class="quality-dot" onclick="setEvaluation(4)" style="background: linear-gradient(135deg, #3b82f6, #1d4ed8);">4</div>
|
| 2089 |
+
<div class="quality-dot" onclick="setEvaluation(5)" style="background: linear-gradient(135deg, #8b5cf6, #7c3aed);">5</div>
|
| 2090 |
+
</div>
|
| 2091 |
</div>
|
| 2092 |
|
| 2093 |
<div class="form-group">
|
| 2094 |
+
<label class="form-label"><i class="fas fa-lightbulb"></i> Stratégie Métacognitive</label>
|
| 2095 |
+
<textarea id="metacognition" class="form-control" rows="3" placeholder="Quelle stratégie avez-vous utilisée ? Que changeriez-vous ?"></textarea>
|
| 2096 |
</div>
|
| 2097 |
|
| 2098 |
<button class="btn btn-primary btn-large" onclick="saveJournal()">
|
| 2099 |
<i class="fas fa-save"></i> Sauvegarder l'Entrée
|
| 2100 |
</button>
|
| 2101 |
+
|
| 2102 |
+
<div id="journalHistory" style="display: none; margin-top: 2rem;">
|
| 2103 |
+
<h4><i class="fas fa-history"></i> Dernières Entrées</h4>
|
| 2104 |
+
<div id="journalEntries"></div>
|
| 2105 |
+
</div>
|
| 2106 |
</div>
|
| 2107 |
</section>
|
| 2108 |
|
|
|
|
| 2110 |
<section id="notifications" class="tab-content">
|
| 2111 |
<div class="card">
|
| 2112 |
<div class="card-header">
|
| 2113 |
+
<h3><i class="fas fa-bell"></i> Notifications Intelligentes par Bandits Multi-Bras</h3>
|
| 2114 |
+
<button class="btn btn-secondary" onclick="getIntelligentReminder()">
|
| 2115 |
+
<i class="fas fa-sync"></i> Nouveau Rappel
|
| 2116 |
+
</button>
|
| 2117 |
</div>
|
| 2118 |
|
| 2119 |
<div id="notificationContainer">
|
| 2120 |
<div class="notification-card">
|
| 2121 |
+
<p><i class="fas fa-info-circle"></i> Cliquez sur "Nouveau Rappel" pour recevoir une notification personnalisée basée sur vos habitudes d'apprentissage.</p>
|
| 2122 |
+
</div>
|
| 2123 |
+
</div>
|
| 2124 |
+
|
| 2125 |
+
<div class="visualization-container">
|
| 2126 |
+
<h4><i class="fas fa-chart-bar"></i> Efficacité des Types de Notifications</h4>
|
| 2127 |
+
<div class="chart-container">
|
| 2128 |
+
<canvas id="notificationChart"></canvas>
|
| 2129 |
</div>
|
| 2130 |
</div>
|
| 2131 |
</div>
|
|
|
|
| 2136 |
<div class="card">
|
| 2137 |
<div class="card-header">
|
| 2138 |
<h3><i class="fas fa-chart-line"></i> Tableau de Bord d'Apprentissage</h3>
|
| 2139 |
+
<button class="btn btn-secondary" onclick="refreshStats()">
|
| 2140 |
+
<i class="fas fa-redo"></i> Actualiser
|
| 2141 |
+
</button>
|
| 2142 |
</div>
|
| 2143 |
|
| 2144 |
+
<div id="statsContainer" class="stats-grid">
|
| 2145 |
<div class="stat-card">
|
| 2146 |
<div class="stat-value">12</div>
|
| 2147 |
<div class="stat-label">Sessions Complétées</div>
|
|
|
|
| 2154 |
<div class="stat-value">7</div>
|
| 2155 |
<div class="stat-label">Jours d'Activité</div>
|
| 2156 |
</div>
|
| 2157 |
+
<div class="stat-card">
|
| 2158 |
+
<div class="stat-value">4.2/5</div>
|
| 2159 |
+
<div class="stat-label">Satisfaction</div>
|
| 2160 |
+
</div>
|
| 2161 |
+
</div>
|
| 2162 |
+
|
| 2163 |
+
<!-- Heatmap d'activité -->
|
| 2164 |
+
<div class="heatmap-container">
|
| 2165 |
+
<div class="heatmap-header">
|
| 2166 |
+
<div class="heatmap-title">
|
| 2167 |
+
<i class="fas fa-fire"></i> Heatmap d'activité
|
| 2168 |
+
</div>
|
| 2169 |
+
<div class="heatmap-controls">
|
| 2170 |
+
<button class="heatmap-period active" onclick="changeHeatmapPeriod('month')">Mois</button>
|
| 2171 |
+
<button class="heatmap-period" onclick="changeHeatmapPeriod('quarter')">Trimestre</button>
|
| 2172 |
+
<button class="heatmap-period" onclick="changeHeatmapPeriod('year')">Année</button>
|
| 2173 |
+
</div>
|
| 2174 |
+
</div>
|
| 2175 |
+
|
| 2176 |
+
<div id="heatmapContent">
|
| 2177 |
+
<!-- La heatmap sera générée ici par JavaScript -->
|
| 2178 |
+
</div>
|
| 2179 |
+
|
| 2180 |
+
<div class="heatmap-legend">
|
| 2181 |
+
<div class="legend-item">
|
| 2182 |
+
<div class="legend-color heatmap-intensity-0"></div>
|
| 2183 |
+
<span>0 min</span>
|
| 2184 |
+
</div>
|
| 2185 |
+
<div class="legend-item">
|
| 2186 |
+
<div class="legend-color heatmap-intensity-1"></div>
|
| 2187 |
+
<span>15 min</span>
|
| 2188 |
+
</div>
|
| 2189 |
+
<div class="legend-item">
|
| 2190 |
+
<div class="legend-color heatmap-intensity-2"></div>
|
| 2191 |
+
<span>30 min</span>
|
| 2192 |
+
</div>
|
| 2193 |
+
<div class="legend-item">
|
| 2194 |
+
<div class="legend-color heatmap-intensity-3"></div>
|
| 2195 |
+
<span>45 min</span>
|
| 2196 |
+
</div>
|
| 2197 |
+
<div class="legend-item">
|
| 2198 |
+
<div class="legend-color heatmap-intensity-4"></div>
|
| 2199 |
+
<span>60+ min</span>
|
| 2200 |
+
</div>
|
| 2201 |
+
</div>
|
| 2202 |
+
</div>
|
| 2203 |
+
|
| 2204 |
+
<!-- Indicateurs de gestion du temps -->
|
| 2205 |
+
<div class="time-management-stats">
|
| 2206 |
+
<div class="time-stat-card">
|
| 2207 |
+
<div class="time-stat-header">
|
| 2208 |
+
<div class="time-stat-icon" style="background: linear-gradient(135deg, #10b981, #059669);">
|
| 2209 |
+
<i class="fas fa-calendar-check"></i>
|
| 2210 |
+
</div>
|
| 2211 |
+
<div>
|
| 2212 |
+
<h4>Régularité du travail</h4>
|
| 2213 |
+
<div class="time-stat-description">Constance de l'activité dans le temps</div>
|
| 2214 |
+
</div>
|
| 2215 |
+
</div>
|
| 2216 |
+
<div class="progress-circle">
|
| 2217 |
+
<svg viewBox="0 0 100 100">
|
| 2218 |
+
<circle cx="50" cy="50" r="45" fill="none" stroke="#e2e8f0" stroke-width="8"/>
|
| 2219 |
+
<circle cx="50" cy="50" r="45" fill="none" stroke="#10b981" stroke-width="8"
|
| 2220 |
+
stroke-linecap="round" stroke-dasharray="283" stroke-dashoffset="28.3"/>
|
| 2221 |
+
</svg>
|
| 2222 |
+
<div class="progress-text">90%</div>
|
| 2223 |
+
</div>
|
| 2224 |
+
</div>
|
| 2225 |
+
|
| 2226 |
+
<div class="time-stat-card">
|
| 2227 |
+
<div class="time-stat-header">
|
| 2228 |
+
<div class="time-stat-icon" style="background: linear-gradient(135deg, #3b82f6, #1d4ed8);">
|
| 2229 |
+
<i class="fas fa-clock"></i>
|
| 2230 |
+
</div>
|
| 2231 |
+
<div>
|
| 2232 |
+
<h4>Gestion des échéances</h4>
|
| 2233 |
+
<div class="time-stat-description">Capacité à respecter les délais</div>
|
| 2234 |
+
</div>
|
| 2235 |
+
</div>
|
| 2236 |
+
<div class="progress-circle">
|
| 2237 |
+
<svg viewBox="0 0 100 100">
|
| 2238 |
+
<circle cx="50" cy="50" r="45" fill="none" stroke="#e2e8f0" stroke-width="8"/>
|
| 2239 |
+
<circle cx="50" cy="50" r="45" fill="none" stroke="#3b82f6" stroke-width="8"
|
| 2240 |
+
stroke-linecap="round" stroke-dasharray="283" stroke-dashoffset="53.77"/>
|
| 2241 |
+
</svg>
|
| 2242 |
+
<div class="progress-text">81%</div>
|
| 2243 |
+
</div>
|
| 2244 |
+
</div>
|
| 2245 |
+
</div>
|
| 2246 |
+
|
| 2247 |
+
<!-- Flashcard Statistics -->
|
| 2248 |
+
<div class="flashcard-section">
|
| 2249 |
+
<h4><i class="fas fa-layer-group"></i> Statistiques des Flashcards</h4>
|
| 2250 |
+
<div class="flashcard-stats-summary">
|
| 2251 |
+
<div class="flashcard-stat-item">
|
| 2252 |
+
<div style="font-size: 2rem; color: #3b82f6; font-weight: bold;" id="statsTotalCards">3</div>
|
| 2253 |
+
<div>Total Flashcards</div>
|
| 2254 |
+
</div>
|
| 2255 |
+
<div class="flashcard-stat-item">
|
| 2256 |
+
<div style="font-size: 2rem; color: #10b981; font-weight: bold;" id="statsMastered">1</div>
|
| 2257 |
+
<div>Maîtrisées</div>
|
| 2258 |
+
</div>
|
| 2259 |
+
<div class="flashcard-stat-item">
|
| 2260 |
+
<div style="font-size: 2rem; color: #f59e0b; font-weight: bold;" id="statsLearning">2</div>
|
| 2261 |
+
<div>En Apprentissage</div>
|
| 2262 |
+
</div>
|
| 2263 |
+
<div class="flashcard-stat-item">
|
| 2264 |
+
<div style="font-size: 2rem; color: #ef4444; font-weight: bold;" id="statsDue">1</div>
|
| 2265 |
+
<div>À Réviser</div>
|
| 2266 |
+
</div>
|
| 2267 |
+
</div>
|
| 2268 |
+
|
| 2269 |
+
<div class="chart-container" style="height: 300px; margin-top: 2rem;">
|
| 2270 |
+
<canvas id="flashcardProgressChart"></canvas>
|
| 2271 |
+
</div>
|
| 2272 |
</div>
|
| 2273 |
</div>
|
| 2274 |
</section>
|
|
|
|
| 2281 |
</div>
|
| 2282 |
|
| 2283 |
<div class="questionnaire-section">
|
| 2284 |
+
<div class="questionnaire-header">
|
| 2285 |
+
<div class="questionnaire-icon" style="background: linear-gradient(135deg, #3b82f6, #1d4ed8);">
|
| 2286 |
+
<i class="fas fa-brain"></i>
|
| 2287 |
+
</div>
|
| 2288 |
+
<div>
|
| 2289 |
+
<div class="questionnaire-title">Algorithme SM-2 - Répétition Espacée</div>
|
| 2290 |
+
<div class="questionnaire-description">Optimisez votre mémorisation à long terme</div>
|
| 2291 |
+
</div>
|
| 2292 |
+
</div>
|
| 2293 |
+
|
| 2294 |
<h4><i class="fas fa-info-circle"></i> Qu'est-ce que l'algorithme SM-2 ?</h4>
|
| 2295 |
<p>L'algorithme SM-2 est un système de répétition espacée développé pour optimiser la mémorisation à long terme.</p>
|
| 2296 |
|
| 2297 |
<h4 style="margin-top: 20px;"><i class="fas fa-chart-line"></i> Comment ça marche ?</h4>
|
| 2298 |
+
<ul style="padding-left: 20px; margin-bottom: 20px;">
|
| 2299 |
<li>Plus vous connaissez bien une information, plus l'intervalle de révision augmente</li>
|
| 2300 |
<li>Les intervalles typiques sont: 1 jour, 3 jours, 7 jours, 14 jours, etc.</li>
|
| 2301 |
<li>Le système s'adapte à vos performances</li>
|
| 2302 |
</ul>
|
| 2303 |
+
|
| 2304 |
+
<div class="visualization-container">
|
| 2305 |
+
<h4><i class="fas fa-chart-network"></i> Comparaison des Niveaux de Qualité SM-2</h4>
|
| 2306 |
+
<div class="chart-container">
|
| 2307 |
+
<canvas id="comparisonChart"></canvas>
|
| 2308 |
+
</div>
|
| 2309 |
+
</div>
|
| 2310 |
</div>
|
| 2311 |
</div>
|
| 2312 |
</section>
|
| 2313 |
</div>
|
| 2314 |
|
| 2315 |
<script>
|
| 2316 |
+
// ============================================
|
| 2317 |
+
// VARIABLES GLOBALES
|
| 2318 |
+
// ============================================
|
| 2319 |
+
|
| 2320 |
// Variables pour le profil
|
| 2321 |
let learnerProfile = {
|
| 2322 |
bigFive: {
|
|
|
|
| 2344 |
}
|
| 2345 |
};
|
| 2346 |
|
| 2347 |
+
// Variables pour les flashcards
|
| 2348 |
+
let flashcards = [
|
| 2349 |
+
{
|
| 2350 |
+
id: 1,
|
| 2351 |
+
question: "Je (être) content de te voir.",
|
| 2352 |
+
answer: "suis",
|
| 2353 |
+
explanation: "'Être' au présent: je suis, tu es, il est, nous sommes, vous êtes, ils sont",
|
| 2354 |
+
category: "conjugaison",
|
| 2355 |
+
difficulty: "moyen",
|
| 2356 |
+
score: 85,
|
| 2357 |
+
mastered: false,
|
| 2358 |
+
nextReview: new Date()
|
| 2359 |
+
},
|
| 2360 |
+
{
|
| 2361 |
+
id: 2,
|
| 2362 |
+
question: "Nous (aller) au marché demain.",
|
| 2363 |
+
answer: "allons",
|
| 2364 |
+
explanation: "'Aller' au présent: je vais, tu vas, il va, nous allons, vous allez, ils vont",
|
| 2365 |
+
category: "conjugaison",
|
| 2366 |
+
difficulty: "facile",
|
| 2367 |
+
score: 92,
|
| 2368 |
+
mastered: true,
|
| 2369 |
+
nextReview: new Date(Date.now() + 3 * 24 * 60 * 60 * 1000)
|
| 2370 |
+
},
|
| 2371 |
+
{
|
| 2372 |
+
id: 3,
|
| 2373 |
+
question: "Elle (faire) ses devoirs chaque soir.",
|
| 2374 |
+
answer: "fait",
|
| 2375 |
+
explanation: "'Faire' au présent: je fais, tu fais, il fait, nous faisons, vous faites, ils font",
|
| 2376 |
+
category: "conjugaison",
|
| 2377 |
+
difficulty: "moyen",
|
| 2378 |
+
score: 78,
|
| 2379 |
+
mastered: false,
|
| 2380 |
+
nextReview: new Date()
|
| 2381 |
+
}
|
| 2382 |
+
];
|
| 2383 |
+
|
| 2384 |
+
let currentFlashcardIndex = 0;
|
| 2385 |
+
let flashcardStats = {
|
| 2386 |
+
streak: 0,
|
| 2387 |
+
totalReviewed: 0,
|
| 2388 |
+
masteryRate: 33,
|
| 2389 |
+
avgScore: 85
|
| 2390 |
+
};
|
| 2391 |
+
|
| 2392 |
+
// Variables pour le planner
|
| 2393 |
+
let selectedTimeSlots = ['morning'];
|
| 2394 |
+
let currentQuality = 2;
|
| 2395 |
+
let productivityMethod = 'pomodoro';
|
| 2396 |
+
let energyPattern = 'morning';
|
| 2397 |
+
|
| 2398 |
+
// Variables pour la heatmap
|
| 2399 |
+
let currentHeatmapPeriod = 'month';
|
| 2400 |
+
|
| 2401 |
+
// Variables pour le journal
|
| 2402 |
+
let journalEntries = [];
|
| 2403 |
+
|
| 2404 |
+
// ============================================
|
| 2405 |
+
// INITIALISATION
|
| 2406 |
+
// ============================================
|
| 2407 |
|
|
|
|
| 2408 |
document.addEventListener('DOMContentLoaded', function() {
|
| 2409 |
+
// Initialiser le profil
|
| 2410 |
updateProfileProgress();
|
| 2411 |
updateProfileSummary();
|
| 2412 |
createMotivationChart();
|
| 2413 |
+
|
| 2414 |
+
// Initialiser les flashcards
|
| 2415 |
+
displayFlashcard(currentFlashcardIndex);
|
| 2416 |
+
updateFlashcardStats();
|
| 2417 |
+
updateFlashcardProgressChart();
|
| 2418 |
+
|
| 2419 |
+
// Initialiser la heatmap
|
| 2420 |
+
generateHeatmap();
|
| 2421 |
+
|
| 2422 |
+
// Initialiser le graphique de comparaison SM-2
|
| 2423 |
+
updateComparisonChart();
|
| 2424 |
+
|
| 2425 |
+
// Initialiser le graphique des notifications
|
| 2426 |
+
createNotificationChart();
|
| 2427 |
+
|
| 2428 |
+
// Charger les données sauvegardées
|
| 2429 |
+
loadSavedData();
|
| 2430 |
});
|
| 2431 |
|
| 2432 |
+
// ============================================
|
| 2433 |
+
// FONCTIONS DE NAVIGATION
|
| 2434 |
+
// ============================================
|
| 2435 |
+
|
| 2436 |
+
function showTab(tabId) {
|
| 2437 |
+
// Masquer toutes les sections
|
| 2438 |
+
document.querySelectorAll('.tab-content').forEach(section => {
|
| 2439 |
+
section.classList.remove('active');
|
| 2440 |
+
});
|
| 2441 |
+
|
| 2442 |
+
// Désactiver tous les onglets
|
| 2443 |
+
document.querySelectorAll('.nav-tab').forEach(tab => {
|
| 2444 |
+
tab.classList.remove('active');
|
| 2445 |
+
});
|
| 2446 |
+
|
| 2447 |
+
// Activer la section sélectionnée
|
| 2448 |
+
document.getElementById(tabId).classList.add('active');
|
| 2449 |
+
|
| 2450 |
+
// Activer l'onglet correspondant
|
| 2451 |
+
const tabNames = {
|
| 2452 |
+
'profile': 'Profil Apprenant',
|
| 2453 |
+
'objectif': 'Objectif',
|
| 2454 |
+
'planner': 'Planner',
|
| 2455 |
+
'flashcards': 'Flashcards',
|
| 2456 |
+
'journal': 'Journal',
|
| 2457 |
+
'notifications': 'Notifications',
|
| 2458 |
+
'stats': 'Statistiques',
|
| 2459 |
+
'learn': 'Apprendre'
|
| 2460 |
+
};
|
| 2461 |
+
|
| 2462 |
+
document.querySelectorAll('.nav-tab').forEach(tab => {
|
| 2463 |
+
if (tab.textContent.includes(tabNames[tabId])) {
|
| 2464 |
+
tab.classList.add('active');
|
| 2465 |
+
}
|
| 2466 |
+
});
|
| 2467 |
+
|
| 2468 |
+
// Actions spécifiques par onglet
|
| 2469 |
+
if (tabId === 'stats') {
|
| 2470 |
+
refreshStats();
|
| 2471 |
+
generateHeatmap();
|
| 2472 |
+
} else if (tabId === 'learn') {
|
| 2473 |
+
updateComparisonChart();
|
| 2474 |
+
}
|
| 2475 |
+
}
|
| 2476 |
+
|
| 2477 |
+
// ============================================
|
| 2478 |
+
// PROFIL APPRENANT
|
| 2479 |
+
// ============================================
|
| 2480 |
+
|
| 2481 |
// Vérifier si toutes les questions d'une section sont répondues
|
| 2482 |
function checkSectionCompletion(sectionId) {
|
| 2483 |
const section = document.getElementById(sectionId);
|
|
|
|
| 2595 |
const totalSections = sections.length;
|
| 2596 |
|
| 2597 |
const percentage = Math.round((completedCount / totalSections) * 100);
|
|
|
|
| 2598 |
|
| 2599 |
// Mettre à jour la barre de progression
|
| 2600 |
document.getElementById('profileCompletion').textContent = `${percentage}%`;
|
|
|
|
| 2688 |
|
| 2689 |
// Compléter automatiquement toutes les sections
|
| 2690 |
function completeAllSections() {
|
| 2691 |
+
// Remplir les sections manquantes avec des valeurs par défaut
|
| 2692 |
+
const defaultValues = {
|
| 2693 |
+
study_hours: 3,
|
| 2694 |
+
late_submissions: 2,
|
| 2695 |
+
completion_rate: 4,
|
| 2696 |
+
forum_participation: 2,
|
| 2697 |
+
sleep_hours: 4,
|
| 2698 |
+
study_stress: 3,
|
| 2699 |
+
relaxation: 3,
|
| 2700 |
+
burnout_risk: 2,
|
| 2701 |
+
family_support: 4,
|
| 2702 |
+
parental_expectations: 4,
|
| 2703 |
+
study_environment: 4,
|
| 2704 |
+
peer_collaboration: 3
|
| 2705 |
+
};
|
| 2706 |
|
| 2707 |
+
// Appliquer les valeurs par défaut
|
| 2708 |
+
Object.keys(defaultValues).forEach(key => {
|
| 2709 |
+
if (key in learnerProfile.habits) {
|
| 2710 |
+
learnerProfile.habits[key] = defaultValues[key];
|
| 2711 |
+
}
|
| 2712 |
+
if (key in learnerProfile.wellbeing) {
|
| 2713 |
+
learnerProfile.wellbeing[key] = defaultValues[key];
|
| 2714 |
+
}
|
| 2715 |
+
if (key in learnerProfile.support) {
|
| 2716 |
+
learnerProfile.support[key] = defaultValues[key];
|
| 2717 |
}
|
| 2718 |
});
|
| 2719 |
|
| 2720 |
+
// Marquer toutes les sections comme complètes
|
| 2721 |
+
Object.keys(learnerProfile.completionStatus).forEach(key => {
|
| 2722 |
+
learnerProfile.completionStatus[key] = true;
|
| 2723 |
});
|
| 2724 |
|
| 2725 |
+
// Mettre à jour l'interface
|
| 2726 |
+
updateProfileProgress();
|
| 2727 |
+
updateProfileSummary();
|
| 2728 |
+
|
| 2729 |
+
// Mettre à jour les indicateurs de section
|
| 2730 |
+
updateSectionCompletion('habits-section');
|
| 2731 |
+
updateSectionCompletion('wellbeing-section');
|
| 2732 |
+
updateSectionCompletion('support-section');
|
| 2733 |
+
|
| 2734 |
showNotification('Toutes les sections ont été complétées automatiquement !', 'success');
|
| 2735 |
}
|
| 2736 |
|
|
|
|
| 2792 |
});
|
| 2793 |
}
|
| 2794 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2795 |
// Mettre à jour l'affichage des recommandations
|
| 2796 |
updateRecommendationsDisplay(recommendations);
|
| 2797 |
}
|
|
|
|
| 2801 |
const container = document.querySelector('.recommendations-section');
|
| 2802 |
let html = '<h4><i class="fas fa-lightbulb"></i> Recommandations Personnalisées Basées sur Votre Profil</h4>';
|
| 2803 |
|
| 2804 |
+
recommendations.forEach(rec => {
|
| 2805 |
html += `
|
| 2806 |
<div class="recommendation-item">
|
| 2807 |
+
<div class="recommendation-icon">${rec.icon}</div>
|
| 2808 |
+
<div>${rec.text}</div>
|
| 2809 |
</div>
|
| 2810 |
`;
|
| 2811 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2812 |
|
| 2813 |
container.innerHTML = html;
|
| 2814 |
}
|
| 2815 |
|
| 2816 |
+
// ============================================
|
| 2817 |
+
// OBJECTIF ET PLANNER
|
| 2818 |
+
// ============================================
|
| 2819 |
+
|
| 2820 |
+
// Sélectionner la méthode de productivité
|
| 2821 |
+
function selectProductivityMethod(method) {
|
| 2822 |
+
productivityMethod = method;
|
| 2823 |
+
document.querySelectorAll('.productivity-option').forEach(option => {
|
| 2824 |
+
option.classList.remove('selected');
|
| 2825 |
+
});
|
| 2826 |
+
event.target.closest('.productivity-option').classList.add('selected');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2827 |
}
|
| 2828 |
|
| 2829 |
+
// Sélectionner le type d'énergie
|
| 2830 |
+
function selectEnergyPattern(pattern) {
|
| 2831 |
+
energyPattern = pattern;
|
| 2832 |
+
document.querySelectorAll('.energy-pattern').forEach(pattern => {
|
| 2833 |
+
pattern.classList.remove('selected');
|
| 2834 |
});
|
| 2835 |
+
event.target.closest('.energy-pattern').classList.add('selected');
|
| 2836 |
+
}
|
| 2837 |
+
|
| 2838 |
+
// Basculer créneau horaire
|
| 2839 |
+
function toggleTimeSlot(slot) {
|
| 2840 |
+
const index = selectedTimeSlots.indexOf(slot);
|
| 2841 |
+
if (index === -1) {
|
| 2842 |
+
selectedTimeSlots.push(slot);
|
| 2843 |
+
} else {
|
| 2844 |
+
selectedTimeSlots.splice(index, 1);
|
| 2845 |
+
}
|
| 2846 |
|
| 2847 |
+
// Mettre à jour l'interface
|
| 2848 |
+
document.querySelectorAll('.time-slot').forEach(element => {
|
| 2849 |
+
element.classList.remove('selected');
|
| 2850 |
});
|
| 2851 |
+
selectedTimeSlots.forEach(slot => {
|
| 2852 |
+
document.querySelector(`.time-slot:nth-child(${getTimeSlotIndex(slot) + 1})`).classList.add('selected');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2853 |
});
|
| 2854 |
}
|
| 2855 |
|
| 2856 |
+
function getTimeSlotIndex(slot) {
|
| 2857 |
+
const slots = ['morning', 'late_morning', 'afternoon', 'late_afternoon', 'evening'];
|
| 2858 |
+
return slots.indexOf(slot);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2859 |
}
|
| 2860 |
|
| 2861 |
+
// Sélectionner la qualité
|
| 2862 |
+
function selectQuality(level) {
|
| 2863 |
+
currentQuality = level;
|
| 2864 |
+
document.querySelectorAll('.quality-dot').forEach(dot => {
|
| 2865 |
+
dot.classList.remove('active');
|
| 2866 |
+
});
|
| 2867 |
+
event.target.classList.add('active');
|
| 2868 |
+
|
| 2869 |
+
const descriptions = [
|
| 2870 |
+
"Difficulté - Révision fréquente nécessaire",
|
| 2871 |
+
"Moyen - Intervalles standard recommandés",
|
| 2872 |
+
"Bon - Consolidation progressive",
|
| 2873 |
+
"Excellent - Rétention à long terme optimale"
|
| 2874 |
+
];
|
| 2875 |
+
document.getElementById('quality-description').textContent = descriptions[level];
|
| 2876 |
+
}
|
| 2877 |
+
|
| 2878 |
+
// Générer le planner
|
| 2879 |
+
function generatePlanner() {
|
| 2880 |
+
const competence = document.getElementById('competence').value;
|
| 2881 |
+
const startDate = document.getElementById('start').value;
|
| 2882 |
+
const duration = document.getElementById('duration').value;
|
| 2883 |
+
|
| 2884 |
+
if (!competence) {
|
| 2885 |
+
showNotification('Veuillez sélectionner une compétence', 'warning');
|
| 2886 |
+
return;
|
| 2887 |
}
|
| 2888 |
+
|
| 2889 |
+
// Générer les intervalles SM-2 basés sur la qualité
|
| 2890 |
+
const intervals = getSM2Intervals(currentQuality);
|
| 2891 |
+
|
| 2892 |
+
// Créer le planning
|
| 2893 |
+
const plan = createStudyPlan(competence, startDate, duration, intervals);
|
| 2894 |
+
|
| 2895 |
+
// Afficher le planning
|
| 2896 |
+
displayPlanner(plan, intervals);
|
| 2897 |
+
|
| 2898 |
+
// Passer à l'onglet planner
|
| 2899 |
+
showTab('planner');
|
| 2900 |
+
|
| 2901 |
+
showNotification('Planner généré avec succès !', 'success');
|
| 2902 |
+
}
|
| 2903 |
+
|
| 2904 |
+
// Obtenir les intervalles SM-2
|
| 2905 |
+
function getSM2Intervals(quality) {
|
| 2906 |
+
const intervals = {
|
| 2907 |
+
0: [1, 2, 4, 8, 16, 32], // Difficulté
|
| 2908 |
+
1: [1, 3, 7, 14, 30, 60], // Moyen
|
| 2909 |
+
2: [2, 7, 16, 35, 70, 140], // Bon
|
| 2910 |
+
3: [3, 10, 25, 60, 120, 240] // Excellent
|
| 2911 |
+
};
|
| 2912 |
+
return intervals[quality] || intervals[2];
|
| 2913 |
+
}
|
| 2914 |
+
|
| 2915 |
+
// Créer le plan d'étude
|
| 2916 |
+
function createStudyPlan(competence, startDate, duration, intervals) {
|
| 2917 |
+
const plan = [];
|
| 2918 |
+
const start = new Date(startDate);
|
| 2919 |
+
|
| 2920 |
+
for (let i = 0; i < intervals.length; i++) {
|
| 2921 |
+
const sessionDate = new Date(start);
|
| 2922 |
+
sessionDate.setDate(sessionDate.getDate() + intervals[i]);
|
| 2923 |
+
|
| 2924 |
+
plan.push({
|
| 2925 |
+
date: sessionDate.toLocaleDateString('fr-FR'),
|
| 2926 |
+
jour: sessionDate.toLocaleDateString('fr-FR', { weekday: 'long' }),
|
| 2927 |
+
competence: competence,
|
| 2928 |
+
duree: `${duration} minutes`,
|
| 2929 |
+
intervalle: `${intervals[i]} jours`,
|
| 2930 |
+
repetition: i + 1,
|
| 2931 |
+
type: i === 0 ? 'Apprentissage' : i < 3 ? 'Consolidation' : 'Maintien',
|
| 2932 |
+
strategie: i === 0 ? 'Focus intense' : 'Révision active',
|
| 2933 |
+
productivity_method: productivityMethod === 'pomodoro' ? '🍅 Pomodoro' : '⏳ Deep Work',
|
| 2934 |
+
optimal_time: energyPattern === 'morning' ? '08:00-10:00' :
|
| 2935 |
+
energyPattern === 'evening' ? '19:00-21:00' : 'Adaptable'
|
| 2936 |
+
});
|
| 2937 |
+
}
|
| 2938 |
+
|
| 2939 |
+
return plan;
|
| 2940 |
+
}
|
| 2941 |
+
|
| 2942 |
+
// Afficher le planner
|
| 2943 |
+
function displayPlanner(plan, intervals) {
|
| 2944 |
+
const container = document.getElementById('plannerContent');
|
| 2945 |
+
const statsContainer = document.getElementById('plannerStats');
|
| 2946 |
+
|
| 2947 |
+
// Calculer le total des jours
|
| 2948 |
+
const totalDays = intervals.reduce((a, b) => a + b, 0);
|
| 2949 |
+
|
| 2950 |
+
// Statistiques
|
| 2951 |
+
statsContainer.innerHTML = `
|
| 2952 |
+
<div class="stat-card">
|
| 2953 |
+
<div class="stat-value">${plan.length}</div>
|
| 2954 |
+
<div class="stat-label">Sessions Planifiées</div>
|
| 2955 |
+
</div>
|
| 2956 |
+
<div class="stat-card">
|
| 2957 |
+
<div class="stat-value">${totalDays}</div>
|
| 2958 |
+
<div class="stat-label">Jours Totaux</div>
|
| 2959 |
+
</div>
|
| 2960 |
+
<div class="stat-card">
|
| 2961 |
+
<div class="stat-value">${currentQuality + 1}/4</div>
|
| 2962 |
+
<div class="stat-label">Niveau de Qualité</div>
|
| 2963 |
+
</div>
|
| 2964 |
+
<div class="stat-card">
|
| 2965 |
+
<div class="stat-value">${document.getElementById('duration').value}min</div>
|
| 2966 |
+
<div class="stat-label">Durée/Session</div>
|
| 2967 |
+
</div>
|
| 2968 |
+
`;
|
| 2969 |
+
|
| 2970 |
+
// Sessions
|
| 2971 |
+
container.innerHTML = '';
|
| 2972 |
+
plan.forEach(session => {
|
| 2973 |
+
const card = document.createElement('div');
|
| 2974 |
+
card.className = 'session-card';
|
| 2975 |
+
card.innerHTML = `
|
| 2976 |
+
<div class="session-header">
|
| 2977 |
+
<div class="session-date">
|
| 2978 |
+
<i class="fas fa-calendar-day"></i> ${session.date}
|
| 2979 |
+
<div style="font-size: 0.9rem; color: #64748b;">${session.jour}</div>
|
| 2980 |
+
</div>
|
| 2981 |
+
<div class="session-repetition">
|
| 2982 |
+
R${session.repetition}
|
| 2983 |
+
</div>
|
| 2984 |
+
</div>
|
| 2985 |
+
<h4 style="margin: 10px 0; color: #1e293b;">${session.competence}</h4>
|
| 2986 |
+
<div class="session-details">
|
| 2987 |
+
<div class="detail-item">
|
| 2988 |
+
<span><i class="fas fa-clock"></i> Durée</span>
|
| 2989 |
+
<span>${session.duree}</span>
|
| 2990 |
+
</div>
|
| 2991 |
+
<div class="detail-item">
|
| 2992 |
+
<span><i class="fas fa-sync-alt"></i> Intervalle</span>
|
| 2993 |
+
<span>${session.intervalle}</span>
|
| 2994 |
+
</div>
|
| 2995 |
+
<div class="detail-item">
|
| 2996 |
+
<span><i class="fas fa-bullseye"></i> Type</span>
|
| 2997 |
+
<span>${session.type}</span>
|
| 2998 |
+
</div>
|
| 2999 |
+
<div class="detail-item">
|
| 3000 |
+
<span><i class="fas fa-lightbulb"></i> Stratégie</span>
|
| 3001 |
+
<span>${session.strategie}</span>
|
| 3002 |
+
</div>
|
| 3003 |
+
<div class="detail-item">
|
| 3004 |
+
<span><i class="fas fa-chart-line"></i> Productivité</span>
|
| 3005 |
+
<span>${session.productivity_method}</span>
|
| 3006 |
+
</div>
|
| 3007 |
+
<div class="detail-item">
|
| 3008 |
+
<span><i class="fas fa-sun"></i> Heure Optimale</span>
|
| 3009 |
+
<span>${session.optimal_time}</span>
|
| 3010 |
+
</div>
|
| 3011 |
+
</div>
|
| 3012 |
+
`;
|
| 3013 |
+
container.appendChild(card);
|
| 3014 |
+
});
|
| 3015 |
+
|
| 3016 |
+
// Visualisation
|
| 3017 |
+
createSM2Visualization(intervals, plan[0]?.competence || 'Compétence');
|
| 3018 |
+
}
|
| 3019 |
+
|
| 3020 |
+
// Créer la visualisation SM-2
|
| 3021 |
+
function createSM2Visualization(intervals, competence) {
|
| 3022 |
+
const ctx = document.getElementById('sm2Visualization').getContext('2d');
|
| 3023 |
+
|
| 3024 |
+
if (window.sm2VisualizationChart) {
|
| 3025 |
+
window.sm2VisualizationChart.destroy();
|
| 3026 |
+
}
|
| 3027 |
+
|
| 3028 |
+
const labels = intervals.map((_, i) => `Répétition ${i + 1}`);
|
| 3029 |
+
|
| 3030 |
+
window.sm2VisualizationChart = new Chart(ctx, {
|
| 3031 |
+
type: 'line',
|
| 3032 |
+
data: {
|
| 3033 |
+
labels: labels,
|
| 3034 |
+
datasets: [{
|
| 3035 |
+
label: 'Intervalle (jours)',
|
| 3036 |
+
data: intervals,
|
| 3037 |
+
borderColor: '#3b82f6',
|
| 3038 |
+
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
| 3039 |
+
borderWidth: 3,
|
| 3040 |
+
fill: true,
|
| 3041 |
+
tension: 0.4
|
| 3042 |
+
}]
|
| 3043 |
+
},
|
| 3044 |
+
options: {
|
| 3045 |
+
responsive: true,
|
| 3046 |
+
maintainAspectRatio: false,
|
| 3047 |
+
plugins: {
|
| 3048 |
+
title: {
|
| 3049 |
+
display: true,
|
| 3050 |
+
text: `Courbe de Répétition Espacée - ${competence}`,
|
| 3051 |
+
font: { size: 16 }
|
| 3052 |
+
}
|
| 3053 |
+
},
|
| 3054 |
+
scales: {
|
| 3055 |
+
y: {
|
| 3056 |
+
beginAtZero: true,
|
| 3057 |
+
title: {
|
| 3058 |
+
display: true,
|
| 3059 |
+
text: 'Jours'
|
| 3060 |
+
}
|
| 3061 |
+
},
|
| 3062 |
+
x: {
|
| 3063 |
+
title: {
|
| 3064 |
+
display: true,
|
| 3065 |
+
text: 'Numéro de Répétition'
|
| 3066 |
+
}
|
| 3067 |
+
}
|
| 3068 |
+
}
|
| 3069 |
+
}
|
| 3070 |
+
});
|
| 3071 |
+
}
|
| 3072 |
+
|
| 3073 |
+
// Exporter le planner
|
| 3074 |
+
function exportPlanner() {
|
| 3075 |
+
const plannerData = document.getElementById('plannerContent').innerText;
|
| 3076 |
+
const blob = new Blob([plannerData], { type: 'text/plain' });
|
| 3077 |
+
const url = URL.createObjectURL(blob);
|
| 3078 |
+
const a = document.createElement('a');
|
| 3079 |
+
a.href = url;
|
| 3080 |
+
a.download = 'planner-sm2.txt';
|
| 3081 |
+
document.body.appendChild(a);
|
| 3082 |
+
a.click();
|
| 3083 |
+
document.body.removeChild(a);
|
| 3084 |
+
URL.revokeObjectURL(url);
|
| 3085 |
+
|
| 3086 |
+
showNotification('Planner exporté avec succès !', 'success');
|
| 3087 |
+
}
|
| 3088 |
+
|
| 3089 |
+
// ============================================
|
| 3090 |
+
// FLASHCARDS
|
| 3091 |
+
// ============================================
|
| 3092 |
|
| 3093 |
+
// Afficher une flashcard
|
| 3094 |
+
function displayFlashcard(index) {
|
| 3095 |
+
if (flashcards.length === 0) return;
|
| 3096 |
+
|
| 3097 |
+
const card = flashcards[index];
|
| 3098 |
+
document.getElementById('flashcardQuestion').textContent = card.question;
|
| 3099 |
+
document.getElementById('flashcardAnswer').textContent = card.answer;
|
| 3100 |
+
document.getElementById('flashcardExplanation').textContent = card.explanation;
|
| 3101 |
+
document.getElementById('flashcardCategory').textContent = card.category.charAt(0).toUpperCase() + card.category.slice(1);
|
| 3102 |
+
document.getElementById('flashcardScore').textContent = `Score: ${card.score}%`;
|
| 3103 |
+
document.getElementById('flashcardDifficulty').textContent = card.difficulty.charAt(0).toUpperCase() + card.difficulty.slice(1);
|
| 3104 |
+
|
| 3105 |
+
// Mettre à jour la progression
|
| 3106 |
+
document.getElementById('currentCard').textContent = index + 1;
|
| 3107 |
+
document.getElementById('totalCards').textContent = flashcards.length;
|
| 3108 |
+
document.getElementById('progressFill').style.width = `${((index + 1) / flashcards.length) * 100}%`;
|
| 3109 |
+
|
| 3110 |
+
// Réinitialiser l'affichage
|
| 3111 |
+
document.getElementById('flashcardFront').style.display = 'block';
|
| 3112 |
+
document.getElementById('flashcardBack').style.display = 'none';
|
| 3113 |
+
document.getElementById('flashcard').classList.remove('flipped');
|
| 3114 |
+
}
|
| 3115 |
+
|
| 3116 |
+
// Retourner la carte
|
| 3117 |
function flipCard() {
|
| 3118 |
const front = document.getElementById('flashcardFront');
|
| 3119 |
const back = document.getElementById('flashcardBack');
|
|
|
|
| 3129 |
}
|
| 3130 |
}
|
| 3131 |
|
| 3132 |
+
// Évaluer la carte
|
| 3133 |
function rateCard(rating) {
|
| 3134 |
+
if (flashcards.length === 0) return;
|
| 3135 |
+
|
| 3136 |
+
const card = flashcards[currentFlashcardIndex];
|
| 3137 |
+
|
| 3138 |
+
// Mettre à jour le score basé sur l'évaluation (0=difficile, 1=moyen, 2=facile)
|
| 3139 |
+
let scoreChange = 0;
|
| 3140 |
+
switch(rating) {
|
| 3141 |
+
case 0: // Difficile
|
| 3142 |
+
scoreChange = -10;
|
| 3143 |
+
break;
|
| 3144 |
+
case 1: // Moyen
|
| 3145 |
+
scoreChange = 5;
|
| 3146 |
+
break;
|
| 3147 |
+
case 2: // Facile
|
| 3148 |
+
scoreChange = 15;
|
| 3149 |
+
card.mastered = true;
|
| 3150 |
+
break;
|
| 3151 |
+
}
|
| 3152 |
+
|
| 3153 |
+
// Mettre à jour le score (limité entre 0 et 100)
|
| 3154 |
+
card.score = Math.max(0, Math.min(100, card.score + scoreChange));
|
| 3155 |
+
|
| 3156 |
+
// Mettre à jour la date de révision
|
| 3157 |
+
const interval = rating === 2 ? 7 : rating === 1 ? 3 : 1;
|
| 3158 |
+
card.nextReview = new Date(Date.now() + interval * 24 * 60 * 60 * 1000);
|
| 3159 |
+
|
| 3160 |
+
// Mettre à jour les statistiques
|
| 3161 |
+
flashcardStats.totalReviewed++;
|
| 3162 |
+
flashcardStats.streak++;
|
| 3163 |
+
|
| 3164 |
+
// Calculer le taux de maîtrise
|
| 3165 |
+
const mastered = flashcards.filter(c => c.mastered).length;
|
| 3166 |
+
flashcardStats.masteryRate = Math.round((mastered / flashcards.length) * 100);
|
| 3167 |
+
|
| 3168 |
+
// Calculer le score moyen
|
| 3169 |
+
const totalScore = flashcards.reduce((sum, c) => sum + c.score, 0);
|
| 3170 |
+
flashcardStats.avgScore = Math.round(totalScore / flashcards.length);
|
| 3171 |
+
|
| 3172 |
+
// Mettre à jour l'affichage
|
| 3173 |
+
updateFlashcardStatsDisplay();
|
| 3174 |
+
|
| 3175 |
+
// Passer à la carte suivante
|
| 3176 |
+
nextCard();
|
| 3177 |
+
}
|
| 3178 |
+
|
| 3179 |
+
// Carte suivante
|
| 3180 |
+
function nextCard() {
|
| 3181 |
+
if (flashcards.length === 0) return;
|
| 3182 |
+
|
| 3183 |
currentFlashcardIndex = (currentFlashcardIndex + 1) % flashcards.length;
|
| 3184 |
displayFlashcard(currentFlashcardIndex);
|
| 3185 |
}
|
| 3186 |
|
| 3187 |
+
// Mettre à jour les statistiques des flashcards
|
| 3188 |
+
function updateFlashcardStats() {
|
| 3189 |
+
const mastered = flashcards.filter(c => c.mastered).length;
|
| 3190 |
+
const due = flashcards.filter(c => new Date(c.nextReview) <= new Date()).length;
|
| 3191 |
+
const totalScore = flashcards.reduce((sum, c) => sum + c.score, 0);
|
|
|
|
|
|
|
| 3192 |
|
| 3193 |
+
flashcardStats = {
|
| 3194 |
+
totalReviewed: flashcardStats.totalReviewed,
|
| 3195 |
+
masteryRate: Math.round((mastered / flashcards.length) * 100),
|
| 3196 |
+
avgScore: Math.round(totalScore / flashcards.length),
|
| 3197 |
+
streak: flashcardStats.streak
|
| 3198 |
+
};
|
| 3199 |
|
| 3200 |
+
updateFlashcardStatsDisplay();
|
| 3201 |
+
updateFlashcardProgressChart();
|
|
|
|
| 3202 |
}
|
| 3203 |
|
| 3204 |
+
// Mettre à jour l'affichage des statistiques
|
| 3205 |
+
function updateFlashcardStatsDisplay() {
|
| 3206 |
+
document.getElementById('streakCount').textContent = flashcardStats.streak;
|
| 3207 |
+
document.getElementById('statsTotalCards').textContent = flashcards.length;
|
| 3208 |
+
document.getElementById('statsMastered').textContent = flashcards.filter(c => c.mastered).length;
|
| 3209 |
+
document.getElementById('statsLearning').textContent = flashcards.filter(c => !c.mastered).length;
|
| 3210 |
+
document.getElementById('statsDue').textContent = flashcards.filter(c => new Date(c.nextReview) <= new Date()).length;
|
| 3211 |
+
}
|
| 3212 |
+
|
| 3213 |
+
// Ajouter une nouvelle flashcard
|
| 3214 |
+
function addNewFlashcard() {
|
| 3215 |
+
const question = document.getElementById('newQuestion').value;
|
| 3216 |
+
const answer = document.getElementById('newAnswer').value;
|
| 3217 |
+
const category = document.getElementById('newCategory').value;
|
| 3218 |
+
const difficulty = document.getElementById('newDifficulty').value;
|
| 3219 |
|
| 3220 |
+
if (!question || !answer) {
|
| 3221 |
+
showNotification('Veuillez entrer une question et une réponse', 'warning');
|
| 3222 |
+
return;
|
| 3223 |
+
}
|
| 3224 |
+
|
| 3225 |
+
const newCard = {
|
| 3226 |
+
id: flashcards.length + 1,
|
| 3227 |
+
question: question,
|
| 3228 |
+
answer: answer,
|
| 3229 |
+
explanation: 'Nouvelle carte à apprendre',
|
| 3230 |
+
category: category,
|
| 3231 |
+
difficulty: difficulty,
|
| 3232 |
+
score: 50,
|
| 3233 |
+
mastered: false,
|
| 3234 |
+
nextReview: new Date()
|
| 3235 |
+
};
|
| 3236 |
+
|
| 3237 |
+
flashcards.push(newCard);
|
| 3238 |
+
|
| 3239 |
+
// Réinitialiser le formulaire
|
| 3240 |
+
document.getElementById('newQuestion').value = '';
|
| 3241 |
+
document.getElementById('newAnswer').value = '';
|
| 3242 |
+
|
| 3243 |
+
// Mettre à jour l'affichage
|
| 3244 |
+
updateFlashcardStats();
|
| 3245 |
+
|
| 3246 |
+
// Afficher la nouvelle carte
|
| 3247 |
+
currentFlashcardIndex = flashcards.length - 1;
|
| 3248 |
+
displayFlashcard(currentFlashcardIndex);
|
| 3249 |
+
|
| 3250 |
+
showNotification('Flashcard ajoutée avec succès !', 'success');
|
| 3251 |
}
|
| 3252 |
|
| 3253 |
+
// Créer le graphique de progression des flashcards
|
| 3254 |
+
function updateFlashcardProgressChart() {
|
| 3255 |
+
const ctx = document.getElementById('flashcardProgressChart').getContext('2d');
|
| 3256 |
+
|
| 3257 |
+
if (window.flashcardProgressChart) {
|
| 3258 |
+
window.flashcardProgressChart.destroy();
|
| 3259 |
+
}
|
| 3260 |
+
|
| 3261 |
+
const mastered = flashcards.filter(c => c.mastered).length;
|
| 3262 |
+
const learning = flashcards.filter(c => !c.mastered).length;
|
| 3263 |
+
|
| 3264 |
+
window.flashcardProgressChart = new Chart(ctx, {
|
| 3265 |
+
type: 'doughnut',
|
| 3266 |
+
data: {
|
| 3267 |
+
labels: ['Maîtrisées', 'En Apprentissage'],
|
| 3268 |
+
datasets: [{
|
| 3269 |
+
data: [mastered, learning],
|
| 3270 |
+
backgroundColor: ['#10b981', '#f59e0b'],
|
| 3271 |
+
borderWidth: 2,
|
| 3272 |
+
borderColor: 'white'
|
| 3273 |
+
}]
|
| 3274 |
+
},
|
| 3275 |
+
options: {
|
| 3276 |
+
responsive: true,
|
| 3277 |
+
maintainAspectRatio: false,
|
| 3278 |
+
plugins: {
|
| 3279 |
+
legend: {
|
| 3280 |
+
position: 'bottom'
|
| 3281 |
+
}
|
| 3282 |
+
},
|
| 3283 |
+
cutout: '60%'
|
| 3284 |
+
}
|
| 3285 |
+
});
|
| 3286 |
}
|
| 3287 |
|
| 3288 |
+
// ============================================
|
| 3289 |
+
// JOURNAL
|
| 3290 |
+
// ============================================
|
| 3291 |
+
|
| 3292 |
+
// Définir l'auto-évaluation
|
| 3293 |
+
function setEvaluation(score) {
|
| 3294 |
+
document.querySelectorAll('.quality-indicator .quality-dot').forEach((dot, index) => {
|
| 3295 |
+
dot.classList.toggle('active', index === score - 1);
|
| 3296 |
+
});
|
| 3297 |
}
|
| 3298 |
|
| 3299 |
+
// Sauvegarder une entrée de journal
|
| 3300 |
function saveJournal() {
|
| 3301 |
+
const entry = {
|
| 3302 |
+
todo: document.getElementById('todo').value,
|
| 3303 |
+
doing: document.getElementById('doing').value,
|
| 3304 |
+
done: document.getElementById('done').value,
|
| 3305 |
+
metacognition: document.getElementById('metacognition').value,
|
| 3306 |
+
timestamp: new Date().toISOString()
|
| 3307 |
+
};
|
| 3308 |
+
|
| 3309 |
+
journalEntries.push(entry);
|
| 3310 |
+
|
| 3311 |
+
// Réinitialiser le formulaire
|
| 3312 |
+
document.getElementById('todo').value = '';
|
| 3313 |
+
document.getElementById('doing').value = '';
|
| 3314 |
+
document.getElementById('done').value = '';
|
| 3315 |
+
document.getElementById('metacognition').value = '';
|
| 3316 |
+
setEvaluation(3);
|
| 3317 |
+
|
| 3318 |
+
// Sauvegarder
|
| 3319 |
+
localStorage.setItem('journalEntries', JSON.stringify(journalEntries));
|
| 3320 |
+
|
| 3321 |
showNotification('Journal sauvegardé avec succès !', 'success');
|
| 3322 |
}
|
| 3323 |
|
| 3324 |
+
// Charger les entrées de journal
|
| 3325 |
+
function loadJournalEntries() {
|
| 3326 |
+
const container = document.getElementById('journalEntries');
|
| 3327 |
+
const history = document.getElementById('journalHistory');
|
| 3328 |
+
|
| 3329 |
+
if (journalEntries.length === 0) {
|
| 3330 |
+
container.innerHTML = '<p>Aucune entrée de journal trouvée.</p>';
|
| 3331 |
+
} else {
|
| 3332 |
+
container.innerHTML = '';
|
| 3333 |
+
journalEntries.slice(-5).reverse().forEach(entry => {
|
| 3334 |
+
const div = document.createElement('div');
|
| 3335 |
+
div.className = 'session-card';
|
| 3336 |
+
div.innerHTML = `
|
| 3337 |
+
<div class="session-header">
|
| 3338 |
+
<div class="session-date">
|
| 3339 |
+
${new Date(entry.timestamp).toLocaleDateString('fr-FR')}
|
| 3340 |
+
</div>
|
| 3341 |
+
</div>
|
| 3342 |
+
${entry.done ? `<div style="margin-top: 10px;"><strong>Accompli:</strong> ${entry.done.substring(0, 100)}...</div>` : ''}
|
| 3343 |
+
`;
|
| 3344 |
+
container.appendChild(div);
|
| 3345 |
+
});
|
| 3346 |
+
}
|
| 3347 |
+
|
| 3348 |
+
history.style.display = 'block';
|
| 3349 |
+
}
|
| 3350 |
+
|
| 3351 |
+
// ============================================
|
| 3352 |
+
// NOTIFICATIONS
|
| 3353 |
+
// ============================================
|
| 3354 |
+
|
| 3355 |
+
// Obtenir un rappel intelligent
|
| 3356 |
+
function getIntelligentReminder() {
|
| 3357 |
+
const notifications = [
|
| 3358 |
+
{
|
| 3359 |
+
type: 'motivation',
|
| 3360 |
+
icon: '🌱',
|
| 3361 |
+
message: "Rappel: Prenez 5 minutes pour planifier votre session d'étude d'aujourd'hui !"
|
| 3362 |
+
},
|
| 3363 |
+
{
|
| 3364 |
+
type: 'rappel_court',
|
| 3365 |
+
icon: '⏰',
|
| 3366 |
+
message: "Il est temps de réviser vos flashcards ! Une courte session maintenant renforcera votre mémoire."
|
| 3367 |
+
},
|
| 3368 |
+
{
|
| 3369 |
+
type: 'encouragement',
|
| 3370 |
+
icon: '💪',
|
| 3371 |
+
message: "Super travail jusqu'à présent ! Continuez à progresser, chaque petite session compte."
|
| 3372 |
+
},
|
| 3373 |
+
{
|
| 3374 |
+
type: 'metacognition',
|
| 3375 |
+
icon: '🤔',
|
| 3376 |
+
message: "Posez-vous cette question: quelle stratégie d'apprentissage fonctionne le mieux pour vous aujourd'hui ?"
|
| 3377 |
+
}
|
| 3378 |
+
];
|
| 3379 |
+
|
| 3380 |
+
const notification = notifications[Math.floor(Math.random() * notifications.length)];
|
| 3381 |
+
const container = document.getElementById('notificationContainer');
|
| 3382 |
+
|
| 3383 |
+
const card = document.createElement('div');
|
| 3384 |
+
card.className = 'notification-card';
|
| 3385 |
+
card.innerHTML = `
|
| 3386 |
+
<div style="display: flex; align-items: center; gap: 15px; margin-bottom: 10px;">
|
| 3387 |
+
<div style="font-size: 2rem;">${notification.icon}</div>
|
| 3388 |
+
<div>
|
| 3389 |
+
<div style="font-weight: bold; color: #1e293b;">${notification.type.charAt(0).toUpperCase() + notification.type.slice(1).replace('_', ' ')}</div>
|
| 3390 |
+
<div style="font-size: 0.9rem; color: #64748b;">
|
| 3391 |
+
Efficacité: ${(Math.random() * 20 + 75).toFixed(1)}%
|
| 3392 |
+
</div>
|
| 3393 |
+
</div>
|
| 3394 |
+
</div>
|
| 3395 |
+
<p style="font-size: 1.1rem; line-height: 1.5;">${notification.message}</p>
|
| 3396 |
+
<div style="margin-top: 10px; font-size: 0.8rem; color: #64748b; text-align: right;">
|
| 3397 |
+
${new Date().toLocaleTimeString('fr-FR')}
|
| 3398 |
+
</div>
|
| 3399 |
+
`;
|
| 3400 |
+
|
| 3401 |
+
container.insertBefore(card, container.firstChild);
|
| 3402 |
+
|
| 3403 |
+
// Limiter à 5 notifications
|
| 3404 |
+
while (container.children.length > 5) {
|
| 3405 |
+
container.removeChild(container.lastChild);
|
| 3406 |
+
}
|
| 3407 |
+
}
|
| 3408 |
+
|
| 3409 |
+
// Créer le graphique des notifications
|
| 3410 |
+
function createNotificationChart() {
|
| 3411 |
+
const ctx = document.getElementById('notificationChart').getContext('2d');
|
| 3412 |
+
|
| 3413 |
+
window.notificationChart = new Chart(ctx, {
|
| 3414 |
+
type: 'bar',
|
| 3415 |
+
data: {
|
| 3416 |
+
labels: ['Motivation', 'Rappels', 'Encouragement', 'Métacognition'],
|
| 3417 |
+
datasets: [{
|
| 3418 |
+
label: 'Efficacité (%)',
|
| 3419 |
+
data: [85, 72, 91, 68],
|
| 3420 |
+
backgroundColor: [
|
| 3421 |
+
'rgba(59, 130, 246, 0.7)',
|
| 3422 |
+
'rgba(16, 185, 129, 0.7)',
|
| 3423 |
+
'rgba(245, 158, 11, 0.7)',
|
| 3424 |
+
'rgba(139, 92, 246, 0.7)'
|
| 3425 |
+
],
|
| 3426 |
+
borderColor: [
|
| 3427 |
+
'rgb(59, 130, 246)',
|
| 3428 |
+
'rgb(16, 185, 129)',
|
| 3429 |
+
'rgb(245, 158, 11)',
|
| 3430 |
+
'rgb(139, 92, 246)'
|
| 3431 |
+
],
|
| 3432 |
+
borderWidth: 2
|
| 3433 |
+
}]
|
| 3434 |
+
},
|
| 3435 |
+
options: {
|
| 3436 |
+
responsive: true,
|
| 3437 |
+
maintainAspectRatio: false,
|
| 3438 |
+
scales: {
|
| 3439 |
+
y: {
|
| 3440 |
+
beginAtZero: true,
|
| 3441 |
+
max: 100,
|
| 3442 |
+
title: {
|
| 3443 |
+
display: true,
|
| 3444 |
+
text: 'Efficacité (%)'
|
| 3445 |
+
}
|
| 3446 |
+
}
|
| 3447 |
+
},
|
| 3448 |
+
plugins: {
|
| 3449 |
+
title: {
|
| 3450 |
+
display: true,
|
| 3451 |
+
text: 'Performance des Types de Notifications',
|
| 3452 |
+
font: { size: 16 }
|
| 3453 |
+
}
|
| 3454 |
+
}
|
| 3455 |
+
}
|
| 3456 |
+
});
|
| 3457 |
+
}
|
| 3458 |
+
|
| 3459 |
+
// ============================================
|
| 3460 |
+
// STATISTIQUES
|
| 3461 |
+
// ============================================
|
| 3462 |
+
|
| 3463 |
+
// Actualiser les statistiques
|
| 3464 |
+
function refreshStats() {
|
| 3465 |
+
// Cette fonction mettrait à jour les statistiques depuis le serveur
|
| 3466 |
+
// Pour l'instant, on utilise des données simulées
|
| 3467 |
+
showNotification('Statistiques actualisées', 'success');
|
| 3468 |
+
}
|
| 3469 |
+
|
| 3470 |
+
// Générer la heatmap
|
| 3471 |
+
function generateHeatmap() {
|
| 3472 |
+
const container = document.getElementById('heatmapContent');
|
| 3473 |
+
|
| 3474 |
+
// Générer des données de démonstration
|
| 3475 |
+
const heatmapData = generateDemoHeatmapData(currentHeatmapPeriod);
|
| 3476 |
+
|
| 3477 |
+
// Créer la structure de la heatmap
|
| 3478 |
+
let html = '<div class="heatmap-grid">';
|
| 3479 |
+
|
| 3480 |
+
// Ajouter les étiquettes des jours
|
| 3481 |
+
const days = ['Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam', 'Dim'];
|
| 3482 |
+
html += '<div class="heatmap-day-label"></div>';
|
| 3483 |
+
days.forEach(day => {
|
| 3484 |
+
html += `<div class="heatmap-day-label">${day}</div>`;
|
| 3485 |
+
});
|
| 3486 |
+
|
| 3487 |
+
// Ajouter les cellules de la heatmap
|
| 3488 |
+
heatmapData.forEach((week, weekIndex) => {
|
| 3489 |
+
html += `<div class="heatmap-week-label">S${weekIndex + 1}</div>`;
|
| 3490 |
+
|
| 3491 |
+
days.forEach((day, dayIndex) => {
|
| 3492 |
+
const activity = week[dayIndex];
|
| 3493 |
+
if (activity !== null) {
|
| 3494 |
+
const intensity = getIntensityLevel(activity);
|
| 3495 |
+
const tooltip = `Jour: ${day}, Semaine ${weekIndex + 1}\nActivité: ${activity} minutes`;
|
| 3496 |
+
html += `
|
| 3497 |
+
<div class="heatmap-cell heatmap-intensity-${intensity}"
|
| 3498 |
+
title="${tooltip}">
|
| 3499 |
+
${activity}
|
| 3500 |
+
</div>
|
| 3501 |
+
`;
|
| 3502 |
+
} else {
|
| 3503 |
+
html += '<div class="heatmap-cell" style="visibility: hidden;"></div>';
|
| 3504 |
+
}
|
| 3505 |
+
});
|
| 3506 |
+
});
|
| 3507 |
+
|
| 3508 |
+
html += '</div>';
|
| 3509 |
+
container.innerHTML = html;
|
| 3510 |
+
}
|
| 3511 |
+
|
| 3512 |
+
// Générer des données de démonstration pour la heatmap
|
| 3513 |
+
function generateDemoHeatmapData(period) {
|
| 3514 |
+
const data = [];
|
| 3515 |
+
let weeks = 4; // Par défaut pour le mois
|
| 3516 |
+
|
| 3517 |
+
if (period === 'quarter') weeks = 13;
|
| 3518 |
+
if (period === 'year') weeks = 52;
|
| 3519 |
+
|
| 3520 |
+
// Pattern d'activité typique
|
| 3521 |
+
for (let week = 0; week < weeks; week++) {
|
| 3522 |
+
const weekData = [];
|
| 3523 |
+
for (let day = 0; day < 7; day++) {
|
| 3524 |
+
// Générer une activité aléatoire avec un pattern spécifique
|
| 3525 |
+
let activity = 0;
|
| 3526 |
+
|
| 3527 |
+
// Plus d'activit�� jeudi (jour 3) et vendredi (jour 4)
|
| 3528 |
+
if (day === 3 || day === 4) {
|
| 3529 |
+
activity = Math.floor(Math.random() * 45) + 30;
|
| 3530 |
+
} else if (day === 0 || day === 6) {
|
| 3531 |
+
activity = Math.floor(Math.random() * 30) + 15;
|
| 3532 |
+
} else {
|
| 3533 |
+
activity = Math.floor(Math.random() * 30);
|
| 3534 |
+
}
|
| 3535 |
+
|
| 3536 |
+
// Ajouter une variabilité hebdomadaire
|
| 3537 |
+
if (week % 4 === 0) {
|
| 3538 |
+
activity = Math.min(activity * 1.3, 90);
|
| 3539 |
+
} else if (week % 4 === 2) {
|
| 3540 |
+
activity = Math.max(activity * 0.7, 10);
|
| 3541 |
+
}
|
| 3542 |
+
|
| 3543 |
+
activity = Math.round(activity);
|
| 3544 |
+
weekData.push(activity);
|
| 3545 |
+
}
|
| 3546 |
+
data.push(weekData);
|
| 3547 |
+
}
|
| 3548 |
+
|
| 3549 |
+
return data;
|
| 3550 |
+
}
|
| 3551 |
+
|
| 3552 |
+
// Obtenir le niveau d'intensité
|
| 3553 |
+
function getIntensityLevel(activity) {
|
| 3554 |
+
if (activity === 0) return 0;
|
| 3555 |
+
if (activity <= 15) return 1;
|
| 3556 |
+
if (activity <= 30) return 2;
|
| 3557 |
+
if (activity <= 45) return 3;
|
| 3558 |
+
return 4;
|
| 3559 |
+
}
|
| 3560 |
+
|
| 3561 |
+
// Changer la période de la heatmap
|
| 3562 |
+
function changeHeatmapPeriod(period) {
|
| 3563 |
+
currentHeatmapPeriod = period;
|
| 3564 |
+
|
| 3565 |
+
// Mettre à jour les boutons
|
| 3566 |
+
document.querySelectorAll('.heatmap-period').forEach(btn => {
|
| 3567 |
+
btn.classList.remove('active');
|
| 3568 |
+
if (btn.textContent.toLowerCase().includes(period)) {
|
| 3569 |
+
btn.classList.add('active');
|
| 3570 |
+
}
|
| 3571 |
+
});
|
| 3572 |
+
|
| 3573 |
+
// Regénérer la heatmap
|
| 3574 |
+
generateHeatmap();
|
| 3575 |
+
}
|
| 3576 |
+
|
| 3577 |
+
// ============================================
|
| 3578 |
+
// APPRENDRE SM-2
|
| 3579 |
+
// ============================================
|
| 3580 |
+
|
| 3581 |
+
// Mettre à jour le graphique de comparaison
|
| 3582 |
+
function updateComparisonChart() {
|
| 3583 |
+
const ctx = document.getElementById('comparisonChart').getContext('2d');
|
| 3584 |
+
|
| 3585 |
+
if (window.comparisonChart) {
|
| 3586 |
+
window.comparisonChart.destroy();
|
| 3587 |
+
}
|
| 3588 |
+
|
| 3589 |
+
// Données des différents niveaux de qualité
|
| 3590 |
+
const intervals = {
|
| 3591 |
+
'Difficulté (N0)': [1, 2, 4, 8, 16, 32],
|
| 3592 |
+
'Moyen (N1)': [1, 3, 7, 14, 30, 60],
|
| 3593 |
+
'Bon (N2)': [2, 7, 16, 35, 70, 140],
|
| 3594 |
+
'Excellent (N3)': [3, 10, 25, 60, 120, 240]
|
| 3595 |
+
};
|
| 3596 |
+
|
| 3597 |
+
const labels = ['R1', 'R2', 'R3', 'R4', 'R5', 'R6'];
|
| 3598 |
+
const colors = ['#ef4444', '#f59e0b', '#10b981', '#3b82f6'];
|
| 3599 |
+
|
| 3600 |
+
const datasets = Object.entries(intervals).map(([label, data], index) => ({
|
| 3601 |
+
label: label,
|
| 3602 |
+
data: data,
|
| 3603 |
+
borderColor: colors[index],
|
| 3604 |
+
backgroundColor: colors[index] + '20',
|
| 3605 |
+
borderWidth: 2,
|
| 3606 |
+
tension: 0.4,
|
| 3607 |
+
fill: false
|
| 3608 |
+
}));
|
| 3609 |
+
|
| 3610 |
+
window.comparisonChart = new Chart(ctx, {
|
| 3611 |
+
type: 'line',
|
| 3612 |
+
data: {
|
| 3613 |
+
labels: labels,
|
| 3614 |
+
datasets: datasets
|
| 3615 |
+
},
|
| 3616 |
+
options: {
|
| 3617 |
+
responsive: true,
|
| 3618 |
+
maintainAspectRatio: false,
|
| 3619 |
+
scales: {
|
| 3620 |
+
y: {
|
| 3621 |
+
beginAtZero: true,
|
| 3622 |
+
title: {
|
| 3623 |
+
display: true,
|
| 3624 |
+
text: 'Intervalle (jours)'
|
| 3625 |
+
}
|
| 3626 |
+
}
|
| 3627 |
+
},
|
| 3628 |
+
plugins: {
|
| 3629 |
+
title: {
|
| 3630 |
+
display: true,
|
| 3631 |
+
text: 'Comparaison des Courbes SM-2 par Niveau de Qualité',
|
| 3632 |
+
font: { size: 16 }
|
| 3633 |
+
}
|
| 3634 |
+
}
|
| 3635 |
+
}
|
| 3636 |
+
});
|
| 3637 |
+
}
|
| 3638 |
+
|
| 3639 |
+
// ============================================
|
| 3640 |
+
// FONCTIONS UTILITAIRES
|
| 3641 |
+
// ============================================
|
| 3642 |
+
|
| 3643 |
+
// Afficher une notification
|
| 3644 |
+
function showNotification(message, type = 'info') {
|
| 3645 |
+
const colors = {
|
| 3646 |
+
success: '#10b981',
|
| 3647 |
+
error: '#ef4444',
|
| 3648 |
+
warning: '#f59e0b',
|
| 3649 |
+
info: '#3b82f6'
|
| 3650 |
+
};
|
| 3651 |
+
|
| 3652 |
+
// Créer une notification temporaire
|
| 3653 |
+
const notification = document.createElement('div');
|
| 3654 |
+
notification.style.cssText = `
|
| 3655 |
+
position: fixed;
|
| 3656 |
+
top: 20px;
|
| 3657 |
+
right: 20px;
|
| 3658 |
+
background: white;
|
| 3659 |
+
color: ${colors[type]};
|
| 3660 |
+
padding: 1rem 1.5rem;
|
| 3661 |
+
border-radius: 10px;
|
| 3662 |
+
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
|
| 3663 |
+
border-left: 4px solid ${colors[type]};
|
| 3664 |
+
z-index: 1000;
|
| 3665 |
+
animation: slideIn 0.3s ease;
|
| 3666 |
+
`;
|
| 3667 |
+
|
| 3668 |
+
notification.innerHTML = `
|
| 3669 |
+
<div style="display: flex; align-items: center; gap: 10px;">
|
| 3670 |
+
<i class="fas fa-${type === 'success' ? 'check-circle' : type === 'error' ? 'exclamation-circle' : type === 'warning' ? 'exclamation-triangle' : 'info-circle'}"></i>
|
| 3671 |
+
<div>${message}</div>
|
| 3672 |
+
</div>
|
| 3673 |
+
`;
|
| 3674 |
+
|
| 3675 |
+
document.body.appendChild(notification);
|
| 3676 |
+
|
| 3677 |
+
// Supprimer après 3 secondes
|
| 3678 |
+
setTimeout(() => {
|
| 3679 |
+
notification.style.animation = 'slideIn 0.3s ease reverse';
|
| 3680 |
+
setTimeout(() => notification.remove(), 300);
|
| 3681 |
+
}, 3000);
|
| 3682 |
+
}
|
| 3683 |
+
|
| 3684 |
+
// Charger les données sauvegardées
|
| 3685 |
+
function loadSavedData() {
|
| 3686 |
+
try {
|
| 3687 |
+
// Charger le profil
|
| 3688 |
+
const savedProfile = localStorage.getItem('learnerProfile');
|
| 3689 |
+
if (savedProfile) {
|
| 3690 |
+
learnerProfile = JSON.parse(savedProfile);
|
| 3691 |
+
updateProfileProgress();
|
| 3692 |
+
updateProfileSummary();
|
| 3693 |
+
}
|
| 3694 |
+
|
| 3695 |
+
// Charger les entrées de journal
|
| 3696 |
+
const savedJournal = localStorage.getItem('journalEntries');
|
| 3697 |
+
if (savedJournal) {
|
| 3698 |
+
journalEntries = JSON.parse(savedJournal);
|
| 3699 |
+
}
|
| 3700 |
+
|
| 3701 |
+
// Charger les flashcards
|
| 3702 |
+
const savedFlashcards = localStorage.getItem('flashcards');
|
| 3703 |
+
if (savedFlashcards) {
|
| 3704 |
+
flashcards = JSON.parse(savedFlashcards);
|
| 3705 |
+
displayFlashcard(currentFlashcardIndex);
|
| 3706 |
+
updateFlashcardStats();
|
| 3707 |
+
}
|
| 3708 |
+
} catch (error) {
|
| 3709 |
+
console.error('Erreur lors du chargement des données:', error);
|
| 3710 |
+
}
|
| 3711 |
+
}
|
| 3712 |
+
|
| 3713 |
+
// Sauvegarder toutes les données
|
| 3714 |
+
function saveAllData() {
|
| 3715 |
+
try {
|
| 3716 |
+
localStorage.setItem('learnerProfile', JSON.stringify(learnerProfile));
|
| 3717 |
+
localStorage.setItem('journalEntries', JSON.stringify(journalEntries));
|
| 3718 |
+
localStorage.setItem('flashcards', JSON.stringify(flashcards));
|
| 3719 |
+
showNotification('Toutes les données ont été sauvegardées', 'success');
|
| 3720 |
+
} catch (error) {
|
| 3721 |
+
showNotification('Erreur lors de la sauvegarde', 'error');
|
| 3722 |
+
}
|
| 3723 |
+
}
|
| 3724 |
+
|
| 3725 |
+
// Sauvegarder automatiquement toutes les 30 secondes
|
| 3726 |
+
setInterval(saveAllData, 30000);
|
| 3727 |
</script>
|
| 3728 |
</body>
|
| 3729 |
</html>
|