Ejemplo n.º 1
0
        public void OnGet(int TestID)
        {
            QuestionsInTest = new List <Question>();

            Test          = apTestData.GetTestByID(TestID);
            QuestionTests = apTestData.GetTestQuestions(TestID);


            for (int i = 0; i < QuestionTests.Count(); i++)
            {
                QuestionsInTest.Add(questionData.GetByQuestionID(QuestionTests[i].QuestionID));
            }

            foreach (var q in QuestionsInTest)
            {
                q.QuestionBody = q.QuestionBody.Replace("\n", "<br>");
            }

            ApplicantsOnTest      = apTestData.GetApplicantsAssignedToTestByID(TestID);
            ApplicantsOnTestCount = ApplicantsOnTest.Count();
        }
Ejemplo n.º 2
0
        public IActionResult OnGet(int?TestID)
        {
            Questions           = apTestData.GetQuestionsAndAnswers();
            UsersAssignedToTest = apTestData.GetApplicantsAssignedToTestByID(TestID).Count();

            if (TestID.HasValue)
            {
                Test = apTestData.GetTestByID(TestID.Value);
            }
            else
            {
                Test = new Test();

                newTest = true;
            }

            if (Test == null)
            {
                return(RedirectToPage("./TestList"));
            }
            return(Page());
        }
Ejemplo n.º 3
0
 public IActionResult OnGet(int TestID)
 {
     Test = apTestData.GetTestByID(TestID);
     return(Page());
 }
 public void OnGet(int?TestID)
 {
     Test       = apTestData.GetTestByID(TestID);
     Applicants = apTestData.GetAllAppUsers();
 }