Esempio n. 1
0
        public void UpdateLeftTime()
        {
            if (info.Status != AssesmentStatus.Started)
            {
                return;
            }

            currentContext.MinutesLeft = currentContext.MinutesLeft - 1;
            if (currentContext.MinutesLeft < 0)
            {
                currentContext.MinutesLeft = 0;
            }

            if (currentContext.MinutesLeft == 0)
            {
                if (EvaluationHasNextSection())
                {
                    MoveToNextSection();
                }
                else
                {
                    End();
                }
            }

            AssesmentPersistence.UpdateContext(id, currentContext);
        }
Esempio n. 2
0
        private void UpdateContext()
        {
            if (SectionHasNextQuestion())
            {
                currentContext.QuestionIndex++;

                UpdateQuestionResponseInfo();
            }
            else
            {
                if (EvaluationHasNextSection())
                {
                    MoveToNextSection();
                }
            }
            AssesmentPersistence.UpdateContext(id, currentContext);
        }
Esempio n. 3
0
 public void Restart()
 {
     AssesmentPersistence.Restart(id);
     AssesmentPersistence.UpdateContext(id, GetDefaultContext());
 }