コード例 #1
0
        public async Task <IActionResult> OnGetAsync(string message = null)
        {
            TeacherID = int.Parse(_httpContextAccessor.HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value);
            Questions = await _questionLoader.GetGroupedQuestionsForTeacher(await _userInfoLoader.GetEncryptedUserNameById(TeacherID));

            if (message != null)
            {
                ModelState.AddModelError("ReportError", message);
            }

            return(Page());
        }
コード例 #2
0
 public async Task OnGetAsync(int studentID)
 {
     Questions = await _questionLoader.GetGroupedQuestionsForStudent(await _userInfoLoader.GetEncryptedUserNameById(studentID));
 }