Commit 60062f9c authored by 黄奎's avatar 黄奎

111

parent b9c5c82f
......@@ -3539,8 +3539,9 @@ namespace Edu.Module.Course
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public object GetStuLearnChapterStaticModule(StuCourseQuery demodel)
public object GetStuLearnChapterStaticModule(StuCourseQuery demodel,out int MaxLength)
{
MaxLength = 0;
List<object> Rlist = new List<object>();
//获取学生所有的报名信息
......@@ -3582,6 +3583,10 @@ namespace Edu.Module.Course
var teacherModel = assistList?.FirstOrDefault(qitem => qitem.AssistType == Common.Enum.User.AssistTypeEnum.Teacher && qitem.StuId == ogModel.Student_Id);
//根据课程Id 查询 上课课程
var cList = totalChapterList?.Where(qitem => qitem.CourseId == item.CourseId)?.ToList();
if (MaxLength < (cList?.Count() ?? 0))
{
MaxLength = (cList?.Count() ?? 0);
}
cList.ForEach(x =>
{
x.SortNum = Convert.ToDouble(x.ChapterNo);
......
......@@ -1100,8 +1100,12 @@ namespace Edu.WebApi.Controllers.Course
//}
demodel.Group_Id = userInfo.Group_Id;
var list = scrollClassModule.GetStuLearnChapterStaticModule(demodel);
return ApiResult.Success("", list);
var list = scrollClassModule.GetStuLearnChapterStaticModule(demodel, out int MaxLength);
return ApiResult.Success("", new
{
list,
MaxLength
});
}
#endregion
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment