|
|
@@ -106,8 +106,15 @@ func (s LearningQuestionService) List(ctx context.Context, req *learning.Learnin
|
|
|
if err != nil {
|
|
|
return 0, nil, err
|
|
|
}
|
|
|
+ answer := []string{}
|
|
|
+ for _, item := range content {
|
|
|
+ if item.IsCorrect {
|
|
|
+ answer = append(answer, item.Name)
|
|
|
+ }
|
|
|
+ }
|
|
|
questions = append(questions, &learning.LearningQuestionGetRsp{
|
|
|
LearningQuestion: *q,
|
|
|
+ Answer: strings.Join(answer, " "),
|
|
|
Content: content,
|
|
|
})
|
|
|
}
|