public async Task <ActionResult> GroupResults(Guid groupId, int page = 1, int pageSize = 10) { var results = await _resultAdminService.GetResultsByGroupIdAsync(groupId, page, pageSize); var group = await _groupAdminService.GetGroupByIdAsync(groupId); List <Breadcrumb> breadcrumb = new List <Breadcrumb>() { new Breadcrumb("Home", "Index", "Home", new { Area = "" }), new Breadcrumb("Groups", "Index", "Group", new { Area = "Admin" }), new Breadcrumb("Group results") }; var viewModel = new GroupResultsViewModel { GroupId = groupId, PageInfo = results, Results = results.Results, Breadcrumb = breadcrumb }; ViewBag.Title = "Results of the group"; ViewBag.SecondTitle = $"Group {group.Number}"; return(View(viewModel)); }
/// <summary> /// Gets the result of a workset using statistical modeling /// </summary> /// <param name="setID">the worksetid</param> /// <returns></returns> public IActionResult Results(int setID) { // Checjs that the user owns the workset if (UserHelper.OwnsWorkset(UserHelper.GetUserId(HttpContext.Session), setID)) { GroupResultsViewModel model = new GroupResultsViewModel(setID); return(View(model)); } return(Unauthorized()); }