public void StartExercise(StepExercise exercise) { var studentExercise = new StudentExercise(this, exercise); studentExercise.StartExercise(); StudentExercises.Add(studentExercise); }
public StudentExercise(StudentXRoadStep studentXRoadStep, StepExercise stepExercise) { StudentXRoadStep = studentXRoadStep; CreateDate = DateTime.Now; StepExercise = stepExercise; }
public void FinishExercise(StepExercise exercise, string fileName) { var studentExercise = GetStudentExercise(exercise); studentExercise.FinishExercise(fileName); }
public bool CanFinishExercise(StepExercise stepExercise) { return(StudentExercises.Any(p => p.StepExercise.Id == stepExercise.Id && p.ExerciseStatus == ExerciseStatus.Started)); }
public bool CanStartExercise(StepExercise stepExercise) { return(StudentExercises.All(p => p.StepExercise.Id != stepExercise.Id || p.ExerciseStatus == ExerciseStatus.Reviewed)); }
public bool IsWaitingForReview(StepExercise stepExercise) { return(StudentExercises.Any(p => p.StepExercise.Id == stepExercise.Id && p.ExerciseStatus == ExerciseStatus.Finished)); }
public StudentExercise GetStudentExercise(StepExercise exercise) { return(GetStudentExercise(exercise.Id)); }