void ReactivateSession() { if (AttemptId == null) { throw new InternalErrorException("SLK1010"); } StoredLearningSession learningSession = new StoredLearningSession(SessionView.RandomAccess, AttemptId, Assignment.Store.PackageStore); // reactivate the attempt learningSession.Reactivate(ReactivateSettings.ResetEvaluationPoints); learningSession.CommitChanges(); // restart the attempt learningSession = new StoredLearningSession(SessionView.Execute, AttemptId, Assignment.Store.PackageStore); learningSession.Start(true); learningSession.CommitChanges(); // NOTE: if (learningSession.AttemptStatus != AttemptStatus.Active) then the // restart process failed -- but there's not much we can do about it, and throwing // an exception may make matters worse }