feat(course): reset student course progress (#671)

* feat(course): add reset student course progress action

Give course admins and tutors a destructive reset-progress flow on the
student people detail page. The backend clears learner progress for one
(courseId, memberId) pair in a single transaction while keeping the
groupmember enrolled, and logs an audit summary. The dashboard shows a
confirmation dialog with impact counts from analytics before deleting.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* fix(i18n): add localized reset progress strings for all locales

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* fix(course): scope reset progress to course data only

Stop deleting org-level community questions and answers during course
progress reset. Fix course newsfeed deletion order so comments on a
student's posts are removed before the posts themselves. Restrict reset
to student members, move analytics loading to the person detail layout,
and rename impact copy to course newsfeed only.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

* fix(course): address Greptile review on reset progress

Make progressImpact opt-in via includeProgressImpact query param so
analytics requests avoid extra DB work unless the reset dialog needs it.
Count only student-authored course newsfeed posts and comments in the
impact summary to avoid double-counting replies on the student's posts.

Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Rotimi Best <rotimi-best@users.noreply.github.com>
This commit is contained in:
Rotimi Best
2026-06-27 10:14:52 +01:00
committed by GitHub
co-authored by Rotimi Best Cursor Agent
parent e43d8a2444
commit a695c97eda
25 changed files with 1056 additions and 59 deletions
@@ -242,6 +242,10 @@
"unpinned": "Nicht angepinnt",
"successfully": "Erfolgreich",
"feed_delete_success": "Feed erfolgreich gelöscht"
},
"people": {
"progress_reset": "Fortschritt zurückgesetzt",
"progress_reset_failed": "Fortschritt konnte nicht zurückgesetzt werden"
}
},
"landing_page_settings": {
@@ -1100,6 +1104,26 @@
"no": "Nein",
"yes": "Ja"
},
"reset_progress": {
"button": "Fortschritt zurücksetzen",
"dialog": {
"title": "Fortschritt von {studentName} zurücksetzen?",
"intro": "Dadurch wird der Fortschritt dieses Teilnehmers in diesem Kurs dauerhaft gelöscht. Die Person bleibt eingeschrieben und kann bei Lektion 1 neu beginnen.",
"bullets": {
"lessons": "Abgeschlossene Lektionen — {completed} von {total}",
"exercises": "Eingereichte Übungen — {count} Abgaben",
"comments": "Lektionskommentare dieses Teilnehmers — {count}",
"newsfeed": "Kurs-Newsfeed-Beiträge und Antworten dieses Teilnehmers — {count}",
"video_progress": "Videofortschritt — {count} verfolgte Lektionen",
"attendance": "Anwesenheitseinträge — {count}",
"certificate_yes": "Zertifizierungs-/Compliance-Daten — ja",
"certificate_no": "Zertifizierungs-/Compliance-Daten — nein"
},
"warning": "Dies kann nicht rückgängig gemacht werden.",
"cancel": "Abbrechen",
"confirm": "Löschen"
}
},
"invite_modal": {
"title": "Leute einladen",
"invite": "Laden Sie Tutoren ein",