master
xiaochanghai 11 months ago
parent 3ecd458f1b
commit 9dab63582d
  1. 22
      Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs

@ -555,15 +555,21 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
detail.content = x.QuestionContent;
detail.difficulty = questions1.FirstOrDefault(a => a.Id == x.QuestionId)?.DifficultyLevel;
//detail.answer = answers1.Where(x => x.IsCorrect == true).FirstOrDefault()?.QuestionNo;
//detail.answer1 = answers1.Where(x => x.IsCorrect == true).Select(x => x.QuestionNo).ToList();
detail.answerList = answers1.Select(x => new FromGhre_QuestionQuestionAnswerList()
{
No = x.QuestionNo,
label = x.AnswerContent,
imageUrl = x.ImageUrl,
imgWidthPc = x.ImageWidthPc,
imgWidthApp = x.ImageWidthApp,
}).ToList();
if (x.QuestionType == "Completion")
detail.answer1 = answers1.Where(x => x.IsCorrect == true).Select(x => "").ToList();
if (x.QuestionType != "Completion")
detail.answerList = answers1.Select(x => new FromGhre_QuestionQuestionAnswerList()
{
No = x.QuestionNo,
label = x.AnswerContent,
imageUrl = x.ImageUrl,
imgWidthPc = x.ImageWidthPc,
imgWidthApp = x.ImageWidthApp,
}).ToList();
x.detail = detail;

Loading…
Cancel
Save