コード例 #1
0
        public void StartExercise(StepExercise exercise)
        {
            var studentExercise = new StudentExercise(this, exercise);

            studentExercise.StartExercise();
            StudentExercises.Add(studentExercise);
        }
コード例 #2
0
 public StudentExercise(StudentXRoadStep studentXRoadStep, StepExercise stepExercise)
 {
     StudentXRoadStep = studentXRoadStep;
     CreateDate       = DateTime.Now;
     StepExercise     = stepExercise;
 }
コード例 #3
0
        public void FinishExercise(StepExercise exercise, string fileName)
        {
            var studentExercise = GetStudentExercise(exercise);

            studentExercise.FinishExercise(fileName);
        }
コード例 #4
0
 public bool CanFinishExercise(StepExercise stepExercise)
 {
     return(StudentExercises.Any(p => p.StepExercise.Id == stepExercise.Id && p.ExerciseStatus == ExerciseStatus.Started));
 }
コード例 #5
0
 public bool CanStartExercise(StepExercise stepExercise)
 {
     return(StudentExercises.All(p => p.StepExercise.Id != stepExercise.Id || p.ExerciseStatus == ExerciseStatus.Reviewed));
 }
コード例 #6
0
 public bool IsWaitingForReview(StepExercise stepExercise)
 {
     return(StudentExercises.Any(p => p.StepExercise.Id == stepExercise.Id && p.ExerciseStatus == ExerciseStatus.Finished));
 }
コード例 #7
0
 public StudentExercise GetStudentExercise(StepExercise exercise)
 {
     return(GetStudentExercise(exercise.Id));
 }