fix(我的培训):「我的培训」的“与我相关”判定(学习任务/讲师/部门范围)不含「参加人员」——线下课不生成学习任务,参加人员只落场次名单与文案,刘义亮(资讯组)被课程部门范围(人事课)拦在页签外。
deploy-hxtesting / build-and-deploy (push) Successful in 20m39s
deploy-hxtesting / build-and-deploy (push) Successful in 20m39s
This commit is contained in:
1 parent
448fbcdaff
commit
11450bdb96
8 files changed
+167
-2
No files matched your search
@@ -1135,6 +1135,18 @@ func (s *trainingService) ListMyLearningTasks(ctx context.Context, tenantID uint
|
||||
return s.repo.ListLearningTasks(ctx, tenantID, member.ID)
|
||||
}
|
||||
|
||||
// ListMyEnrolledCourseIDs 我经场次学员名单报名的课程 id 去重集合(我的培训
|
||||
// 「我参加」判定数据源):参加人员此前只落场次名单与 post_scope 文案,不进
|
||||
// 任何"与我相关"判定,线下课参加人员在「我的培训」看不到课。未建培训档案
|
||||
// 返回空集(与 ListMyLearningTasks 同口径,不报错)。
|
||||
func (s *trainingService) ListMyEnrolledCourseIDs(ctx context.Context, tenantID uint64, userID string) ([]string, error) {
|
||||
member, err := s.repo.GetMemberByUserID(ctx, tenantID, userID)
|
||||
if err != nil {
|
||||
return []string{}, nil
|
||||
}
|
||||
return s.repo.ListMyEnrolledCourseIDs(ctx, tenantID, member.ID)
|
||||
}
|
||||
|
||||
// ListCourseLearningTasks returns all members' learning tasks of one course
|
||||
// (管理端「学习考试」课程学习情况;任务不存在但已发布课程的名单成员由前端按待学习渲染口径,此处按实际任务行返回)。
|
||||
func (s *trainingService) ListCourseLearningTasks(ctx context.Context, tenantID uint64, courseID string) ([]*types.TrainingLearningTask, error) {
|
||||
|
||||
Reference in new issue
Block a user