Example #1
0
        public void ShowConcreteLesson(TestKey key)
        {
            var test = _testService.GetTestByTaskDescription(key);

            RedirectDecorator.ToViewModel(ChangePage.CreateAndPassData(typeof(TestResultViewModel), typeof(UserTestModel), test)
                                          );
        }
Example #2
0
 private void ShowCreateATest()
 {
     if (CurrentUser.Instance.Role == Roles.Master)
     {
         RedirectDecorator.ToViewModel(typeof(CreateTestViewModel));
     }
     else
     {
         MessageError.Show(ErrorResources.OnlyMasterCanCreateTests);
     }
 }
Example #3
0
        private void ShowPassATest()
        {
            switch (CurrentUser.Instance.Role)
            {
            case Roles.Student:
                RedirectDecorator.ToViewModel(typeof(TestListViewModel));
                break;

            case Roles.Master:
                MessageBox.Show(ErrorResources.TeacherCannotPassATest);
                break;
            }
        }
 public void StartTest(TestKey test)
 {
     TinyTempCache.Set(typeof(TestKey), test);
     RedirectDecorator.ToViewModel(typeof(StartedTestViewModel));
 }
Example #5
0
 public void BackMenu()
 {
     RedirectDecorator.ToViewModel(typeof(MenuViewModel));
 }
Example #6
0
 private void ShowGradebook()
 {
     RedirectDecorator.ToViewModel(CurrentUser.Instance.Role == Roles.Student
         ? typeof(GradebookViewModel)
         : typeof(MasterGradebookViewModel));
 }