Beispiel #1
0
        private ActionResult MoveForward(IQuestion model)
        {
            _answerManager.StoreAnswerId(model.Id, model.Answer ?? _httpWrapper.Form[model.Id]);

            var nextQuestion = _questionManager.GetNextQuestion(model.Id);

            if (nextQuestion == null)
            {
                return(RedirectToResults());
            }

            return(RedirectToAction(MVC.Questions.ActionNames.Index, new { id = nextQuestion.Id }));
        }
 public virtual ActionResult Index()
 {
     return(View(new LandingModel {
         FirstQuestionId = _questionManager.GetNextQuestion().Id
     }));
 }