private async Task PreProcess()
        {
            // Lấy danh sách các loại kỳ thi hiện đang có
            var res = await _ExamCategoryService.GetBase();

            if (res.Success && res.Data != null)
            {
                ExamCats = res.Data;
            }

            // Nếu không được truyền giá trị là hiển thị thống kê cho kỳ thi nào thì tiến hành hiển thị cho record kỳ thi đầu tiên
            if (ExamCategoryId == null || ExamCategoryId == Guid.Empty)
            {
                ExamCategoryId = ExamCats.FirstOrDefault()?.Id ?? Guid.Empty;
            }

            // Lấy các thông số thống kê cơ bản
            CompletedTests = await _ExamLogService.GetCompletedTest(ExamCategoryId.Value);

            PassedTests = await _ExamLogService.GetPassedTest(ExamCategoryId.Value);

            FailedTests = await _ExamLogService.GetFaildTest(ExamCategoryId.Value);

            UserGPA = await _ScoreLogService.GetExamCategoryGPA(ExamCategoryId.Value);

            // Lấy điểm cân bằng kỹ năng
            var balanceSkills = await _ScoreLogService.GetSkillCategoryGPAs(ExamCategoryId.Value);

            ViewData["BalanceSkills"]     = balanceSkills;
            ViewData["BalanceSkillsJson"] = JsonConvert.SerializeObject(balanceSkills);

            // Lấy điểm tối đa của phần thi
            var examCategoryMaxScores = _ExamCategoryService.GetMaxScores(ExamCategoryId.Value);

            UserGPARate = UserGPA / examCategoryMaxScores;

            CurrentExamCategory = ExamCats.First(x => x.Id == ExamCategoryId);

            // Lấy danh sách skill cat
            ViewData["AllSkillCats"] = await _ExamCategoryService.GetFullChild(ExamCategoryId.Value);

            ViewData["CurrentExamCatId"]   = ExamCategoryId.Value;
            ViewData["CurrentExamCatName"] = CurrentExamCategory.Name;

            // Kiểm tra xem đây có phải là giáo viên hướng dẫn không
            if (await _ExamCatInstructorRepository.IgnoreAutoIncludes().AnyAsync(x =>
                                                                                 x.UserId == CurrentUser.Id && x.ExamCategoryId == ExamCategoryId.Value))
            {
                ViewData["IsInstructor"] = true;

                // Lấy danh sách học viên
                ViewData["Students"] = await _ExamLogService.GetExamLogStudents(ExamCategoryId.Value);
            }
        }