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()); }
public async Task OnGetAsync(int studentID) { Questions = await _questionLoader.GetGroupedQuestionsForStudent(await _userInfoLoader.GetEncryptedUserNameById(studentID)); }