Пример #1
0
        public IActionResult Update(UpdateExerciseViewModel model)
        {
            var course = courseManager.GetById(model.CourseId);

            if (ModelState.IsValid)
            {
                exerciseManager.Update(model.Id, model.TaskName, model.TaskTextField,
                                       model.TaskBaseCodeField, model.CourseId,
                                       course.Name, DateTime.Now, model.TestCases);
            }
            return(RedirectToAction("Index", "ExerciseManagement"));
        }