public string ToPrettyString()
 {
     return("AssignmentOverride {" +
            ($"\n{nameof(Id)}: {Id}," +
             $"\n{nameof(AssignmentId)}: {AssignmentId}," +
             $"\n{nameof(StudentIds)}: {StudentIds?.ToPrettyString()}," +
             $"\n{nameof(GroupId)}: {GroupId}," +
             $"\n{nameof(CourseSectionId)}: {CourseSectionId}," +
             $"\n{nameof(Title)}: {Title}," +
             $"\n{nameof(DueAt)}: {DueAt}," +
             $"\n{nameof(AllDay)}: {AllDay}," +
             $"\n{nameof(AllDayDate)}: {AllDayDate}," +
             $"\n{nameof(UnlockAt)}: {UnlockAt}," +
             $"\n{nameof(LockAt)}: {LockAt}").Indent(4) +
            "\n}");
 }
示例#2
0
 /// <summary>
 /// 指定学生是否正在参与学习
 /// </summary>
 /// <param name="studentId"></param>
 /// <returns></returns>
 public bool HasStudy(long studentId)
 {
     return(StudentIds.Any(m => m == studentId));
 }
示例#3
0
 /// <summary>
 /// 获取正在参与学习的学生列表
 /// </summary>
 /// <returns></returns>
 public List <ApiModels.Student> GetStudyStudents()
 {
     return(AllStudents.Where(m => StudentIds.Any(c => m.id == c)).ToList());
 }