Extend the analytics dashboard with live subscription snapshots, renewal/resubscribe metrics, and field-options normalization so Unknown and invalid profile values aggregate as Other. Also include exam_prep in the learner progress summary. Co-authored-by: Cursor <cursoragent@cursor.com>
41 lines
1.6 KiB
Go
41 lines
1.6 KiB
Go
package domain
|
|
|
|
// LMSProgressSummary returns the learner's progress tree using the same access
|
|
// contract exposed by the LMS hierarchy endpoints.
|
|
// ExamPrep is optional: set on GET /lms/progress-summary for learners; omitted in admin LMS-only embeds.
|
|
type LMSProgressSummary struct {
|
|
Programs []LMSProgressSummaryProgram `json:"programs"`
|
|
ExamPrep *ExamPrepProgressSummary `json:"exam_prep,omitempty"`
|
|
}
|
|
|
|
type LMSProgressSummaryProgram struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Access *LMSEntityAccess `json:"access,omitempty"`
|
|
Courses []LMSProgressSummaryCourse `json:"courses"`
|
|
}
|
|
|
|
type LMSProgressSummaryCourse struct {
|
|
ID int64 `json:"id"`
|
|
ProgramID int64 `json:"program_id"`
|
|
Name string `json:"name"`
|
|
Access *LMSEntityAccess `json:"access,omitempty"`
|
|
Modules []LMSProgressSummaryModule `json:"modules"`
|
|
}
|
|
|
|
type LMSProgressSummaryModule struct {
|
|
ID int64 `json:"id"`
|
|
ProgramID int64 `json:"program_id"`
|
|
CourseID int64 `json:"course_id"`
|
|
Name string `json:"name"`
|
|
Access *LMSEntityAccess `json:"access,omitempty"`
|
|
Lessons []LMSProgressSummaryLesson `json:"lessons"`
|
|
}
|
|
|
|
type LMSProgressSummaryLesson struct {
|
|
ID int64 `json:"id"`
|
|
ModuleID int64 `json:"module_id"`
|
|
Title string `json:"title"`
|
|
Access *LMSEntityAccess `json:"access,omitempty"`
|
|
}
|