Fix 7 UX pain points: grading filter, next-item nav, lesson prose, gradebook calc, auto-schedule skip, lesson item defaults, planner improvements

- Grading: add student filter dropdown, Enter-to-save, and point max always defaults to 100
- Student side: show next-item/back-to-course actions after completing a lesson or assignment
- Lesson body: apply prose typography styles (headings, lists, blockquotes, links, hr)
- Gradebook: fix % display when points_possible is 0 (default to 100 on grade save)
- Auto-schedule: skip items that already have a submission
- Item editor: default new/existing item point values to 100 instead of 10
- Planner: friendly week date header, per-day short date, today highlight, course color on task pills, done toggle, within-day drag reorder, Today button

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-08-04 16:33:59 -04:00
1 parent 60a2a597c5
commit 538522cfe7
6 files changed
+94 -25

No files matched your search

+10 -7
View File
@@ -1569,11 +1569,13 @@ app.put('/api/submissions/:id/grade', requirePin, (req, res) => {
const score = Number(req.body.score);
if (Number.isNaN(score)) return res.status(400).json({ error: 'Score must be a number' });
const comment = req.body.parentComment !== undefined ? String(req.body.parentComment).trim() || null : undefined;
db.prepare(`
UPDATE submissions SET score = ?, status = 'graded', graded_at = datetime('now')
${comment !== undefined ? ', parent_comment = ?' : ''}
WHERE id = ?
`).run(...(comment !== undefined ? [score, comment, req.params.id] : [score, req.params.id]));
const pp = req.body.pointsPossible !== undefined ? Number(req.body.pointsPossible) : null;
const sets = [`score = ?`, `status = 'graded'`, `graded_at = datetime('now')`];
const vals = [score];
if (comment !== undefined) { sets.push('parent_comment = ?'); vals.push(comment); }
if (pp && pp > 0) { sets.push('points_possible = CASE WHEN COALESCE(points_possible, 0) = 0 THEN ? ELSE points_possible END'); vals.push(pp); }
vals.push(req.params.id);
db.prepare(`UPDATE submissions SET ${sets.join(', ')} WHERE id = ?`).run(...vals);
res.json({ ok: true });
});
@@ -1839,9 +1841,10 @@ app.post('/api/schedule/auto', requirePin, (req, res) => {
const items = db.prepare(`
SELECT i.id, i.title FROM items i
JOIN units u ON u.id = i.unit_id
WHERE u.course_id = ?
LEFT JOIN submissions sub ON sub.item_id = i.id AND sub.student_id = ?
WHERE u.course_id = ? AND sub.id IS NULL
ORDER BY u.sort, i.sort
`).all(courseId);
`).all(studentId, courseId);
if (!items.length) return res.json({ scheduled: 0 });
const perDay = Math.max(1, Math.min(20, Number(itemsPerDay)));