Track each spelling practice pass as a separate activity record

Each time a student completes a pass through a spelling_practice course
item — initial round, missed-words drill, or a retry — a row is now
written to submission_history so the parent sees individual attempts
instead of a single day-grouped entry.

- app.js: send sessionAttempted/sessionCorrect with /complete calls
- server.js: write to submission_history on each spelling_practice
  completion; add GET /api/spelling-sessions endpoint
- admin.html/js: new "Practice Sessions" table shows one row per pass

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-08-14 09:08:53 -04:00
1 parent bb56b9b9e8
commit 2834738598
4 files changed
+94 -4

No files matched your search

+9 -1
View File
@@ -2164,7 +2164,15 @@ async function nextPracticeWord() {
$('#practice-progress').textContent = 'Done!';
$('#practice-card').hidden = true;
if (practice.itemId) {
await api(`/api/items/${practice.itemId}/complete`, { method: 'POST', body: { studentId: currentStudent.id, date: todayStr() } });
await api(`/api/items/${practice.itemId}/complete`, {
method: 'POST',
body: {
studentId: currentStudent.id,
date: todayStr(),
sessionAttempted: practice.words.length,
sessionCorrect: practice.firstTryCorrect,
},
});
}
const missedWords = practice.missedWords.slice();
const missedHtml = practice.missed.length