public void UpdateCounters() {
     Counters[EvaluationStatus.None] = Evaluations.Where(e => e.Status == EvaluationStatus.None).Count();
     Counters[EvaluationStatus.Evaluated] = Evaluations.Where(e => e.Status == EvaluationStatus.Evaluated).Count();
     Counters[EvaluationStatus.Evaluating] = Evaluations.Where(e => e.Status == EvaluationStatus.Evaluating).Count();
     Counters[EvaluationStatus.EvaluatorReplacement] = Evaluations.Where(e => e.Status == EvaluationStatus.EvaluatorReplacement).Count();
     Counters[EvaluationStatus.Invalidated] = Evaluations.Where(e => e.Status == EvaluationStatus.Invalidated).Count();
 }
 public long GetEvaluationsCount(EvaluationStatus status)
 {
     return Evaluations.Where(e => e.Status == status).Count();
 }
Exemplo n.º 3
0
 public Evaluation GetEvaluation(int evaluatorId)
 {
     return(Evaluations.Where(e => e.EvaluatorId == evaluatorId).FirstOrDefault());
 }
Exemplo n.º 4
0
 public virtual List <expEvaluation> GetEvaluations(long idEvaluator)
 {
     return((Evaluations == null) ? new List <expEvaluation>() : Evaluations.Where(e => e.Evaluator != null && e.Evaluator.Id == idEvaluator && e.Submission != null).OrderBy(e => e.Submission.Id).ToList());
 }
Exemplo n.º 5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="userId"></param>
 /// <returns></returns>
 public async Task <List <Evaluation> > ToList(string userId)
 {
     return(await Evaluations.Where(u => u.UserId == userId)
            .Include(u => u.Subject)
            .ToListAsync());
 }