/// <summary> /// Confirm to ban a test taker /// </summary> private async Task BanTestTakerConfirm() { var res = await ExamServices.BanExamTaker(_examId, _banTakerName, _banReason); if (res == ErrorCodes.Success) { await Modal.SuccessAsync(new ConfirmOptions() { Content = $"Exam taker {_banTakerName} have been banned" }); // Shows the ban icon on the video panel GetExamTakerVideoCard(_banTakerName).SetBanned(true); } else { await Modal.ErrorAsync(new ConfirmOptions() { Title = "Cannot ban exam taker", Content = ErrorCodes.MessageMap[res] }); } _banTakerName = null; _banModalVisible = false; }