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); }
private void UpdateContext() { if (SectionHasNextQuestion()) { currentContext.QuestionIndex++; UpdateQuestionResponseInfo(); } else { if (EvaluationHasNextSection()) { MoveToNextSection(); } } AssesmentPersistence.UpdateContext(id, currentContext); }
public void Restart() { AssesmentPersistence.Restart(id); AssesmentPersistence.UpdateContext(id, GetDefaultContext()); }