Expose a single learner endpoint that returns the nested LMS hierarchy with the same access-based progress percentages used across the existing content APIs. Co-authored-by: Cursor <cursoragent@cursor.com>
39 lines
1.4 KiB
Go
39 lines
1.4 KiB
Go
package domain
|
|
|
|
// LMSProgressSummary returns the learner's progress tree using the same access
|
|
// contract exposed by the LMS hierarchy endpoints.
|
|
type LMSProgressSummary struct {
|
|
Programs []LMSProgressSummaryProgram `json:"programs"`
|
|
}
|
|
|
|
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"`
|
|
}
|