|
|
@ -105,7 +105,7 @@ public class Ghre_CourseWareServices : BaseServices<Ghre_CourseWare, Ghre_Course |
|
|
|
|
|
|
|
|
|
|
|
var attachments = await _ghre_CourseWareAttachmentServices.Query(x => x.CourseWareId == body.id); |
|
|
|
var attachments = await _ghre_CourseWareAttachmentServices.Query(x => x.CourseWareId == body.id); |
|
|
|
|
|
|
|
|
|
|
|
result.result.DT_TableDataT1[0].Attachments = attachments.Where(x => x.AttachFileExtension != "http").ToList(); |
|
|
|
result.result.DT_TableDataT1[0].Attachments = attachments.OrderBy(x => x.SortNo).Where(x => x.AttachFileExtension != "http").ToList(); |
|
|
|
if (result.result.DT_TableDataT1[0].Attachments.Any()) |
|
|
|
if (result.result.DT_TableDataT1[0].Attachments.Any()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
result.result.DT_TableDataT1[0].Attachments.ForEach(x => x.RelativePath = "/Advanced" + x.RelativePath); |
|
|
|
result.result.DT_TableDataT1[0].Attachments.ForEach(x => x.RelativePath = "/Advanced" + x.RelativePath); |
|
|
@ -179,7 +179,7 @@ public class Ghre_CourseWareServices : BaseServices<Ghre_CourseWare, Ghre_Course |
|
|
|
|
|
|
|
|
|
|
|
x.StudyDuration = $"{x.Hours}小时{x.Minutes}分钟"; |
|
|
|
x.StudyDuration = $"{x.Hours}小时{x.Minutes}分钟"; |
|
|
|
x.SourceLabel = await GetParaLabel("CourseWareSource", x.Source); |
|
|
|
x.SourceLabel = await GetParaLabel("CourseWareSource", x.Source); |
|
|
|
x.Attachments = attachments.Where(a => a.CourseWareId == x.Id && a.AttachFileExtension != "http").ToList(); |
|
|
|
x.Attachments = attachments.Where(a => a.CourseWareId == x.Id && a.AttachFileExtension != "http").OrderBy(x => x.SortNo).ToList(); |
|
|
|
x.Links = attachments.Where(x => x.AttachFileExtension == "http") |
|
|
|
x.Links = attachments.Where(x => x.AttachFileExtension == "http") |
|
|
|
.Select(x => new Ghre_CourseWareLink() |
|
|
|
.Select(x => new Ghre_CourseWareLink() |
|
|
|
{ |
|
|
|
{ |
|
|
|