Beispiel #1
0
        public ActionResult Next(Question question)
        {
            TestingAct testingAct = TestService.GetTestingActById((int)Session["TestingActId"]);

            testingAct.AddScore(question.UserAnswerId);
            TestService.AddUserAnswer(testingAct.CurrentQuestion, question.UserAnswerId, testingAct.Id);
            testingAct.CurrentQuestion = testingAct.Test.GetNextQuestion(testingAct.CurrentQuestion);
            if (testingAct.CurrentQuestion != null)
            {
                return(View(testingAct.CurrentQuestion));
            }
            else
            {
                testingAct.IsFinished = true;
                return(RedirectToAction("Finish"));
            }
        }