Пример #1
0
 public Boolean CompiledBeforeDate(DateTime?before)
 {
     if (!before.HasValue)
     {
         return(Attempts.Any());
     }
     else
     {
         dtoQuizAttemptInfo last = Attempts.Where(q => !q.CompletedOn.HasValue || q.CompletedOn <= before.Value).OrderByDescending(a => a.Id).ToList().FirstOrDefault();
         return(last != null);
     }
 }
Пример #2
0
 public Boolean PassedByDate(DateTime?before)
 {
     if (!before.HasValue)
     {
         return(Passed);
     }
     else
     {
         dtoQuizAttemptInfo last = Attempts.Where(q => q.CompletedOn.HasValue && q.CompletedOn <= before.Value).OrderByDescending(a => a.CompletedOn).ToList().FirstOrDefault();
         return(last != null && (last.Completed && (!Evaluable || (Evaluable && last.Passed))));
     }
 }