Exemplo n.º 1
0
 public Score GetScore() {
   //DEBUG
   //return score;
   Score res = new Score();
   foreach (PageResult ex in Results.Where(r => r.Status == ExerciseStatus.Evaluated)) { res.From += ex.EvalScore.From; res.Correct += ex.EvalScore.Correct; res.NeedsHumanEval = res.NeedsHumanEval || ex.EvalScore.NeedsHumanEval; }
   return res;
 }
Exemplo n.º 2
0
 public override Score GetScore() {
   Score res = new Score();
   if (combineResultOr()) {
     foreach (EvalExercise ex in EvalSubExercises()) { Score subScore = ex.GetScore(); res.From += subScore.From; res.Correct += subScore.Correct; res.NeedsHumanEval = res.NeedsHumanEval || subScore.NeedsHumanEval; }
   } else {
     res.From = 1; res.Correct = 1;
     foreach (EvalExercise ex in EvalSubExercises()) {
       Score subScore = ex.GetScore();
       if (subScore.From != subScore.Correct) { res.Correct = 0; return res; }
       res.NeedsHumanEval = res.NeedsHumanEval || subScore.NeedsHumanEval;
     }
   }
   return res;
 }