public ActionResult BySubmissionSimilarity() { var viewModel = new SubmissionSimilarityFiltersInputModel { PlagiarismDetectorTypes = DropdownViewModel.GetEnumValues <PlagiarismDetectorType>() }; return(this.View(viewModel)); }
public ActionResult GetSubmissions(int id) { if (!this.CheckIfUserHasProblemPermissions(id)) { return(this.RedirectToContestsAdminPanelWithNoPrivilegesMessage()); } this.ViewBag.SubmissionStatusData = DropdownViewModel.GetEnumValues <SubmissionStatus>(); return(this.PartialView("_SubmissionsGrid", id)); }
private void PrepareViewBagData(int?contestId = null) { this.ViewBag.TypeData = DropdownViewModel.GetEnumValues <ContestType>(); this.ViewBag.SubmissionExportTypes = DropdownViewModel.GetEnumValues <SubmissionExportType>(); if (contestId.HasValue) { // TODO: find a better solution for determining whether a Contest is active or not this.ViewBag.IsActive = this.contestsData.IsActiveById(contestId.Value); } }
public ActionResult GetSubmissions(int id) { if (!this.CheckIfUserHasProblemPermissions(id)) { this.TempData[GlobalConstants.DangerMessage] = "Нямате привилегиите за това действие"; return(this.RedirectToAction("Index", "Contests", new { area = "Administration" })); } this.ViewBag.SubmissionStatusData = DropdownViewModel.GetEnumValues <SubmissionStatus>(); return(this.PartialView("_SubmissionsGrid", id)); }
public ActionResult GetSubmissions(int id) { if (!this.CheckIfUserHasProblemPermissions(id)) { this.TempData.AddDangerMessage(GlobalConstants.NoPrivilegesMessage); return(this.RedirectToAction("Index", "Contests", new { area = "Administration" })); } this.ViewBag.SubmissionStatusData = DropdownViewModel.GetEnumValues <SubmissionStatus>(); return(this.PartialView("_SubmissionsGrid", id)); }
private void AddCheckersAndProblemGroupsToProblemViewModel( ViewModelType problem, int numberOfProblemGroups, bool isOnlineContest) { problem.AvailableCheckers = this.checkersData .GetAll() .Select(checker => new SelectListItem { Text = checker.Name, Value = checker.Name, Selected = checker.Name.Contains("Trim") }); if (isOnlineContest && numberOfProblemGroups > 0) { this.ViewBag.ProblemGroupIdData = this.problemGroupsData .GetAllByContest(problem.ContestId) .OrderBy(pg => pg.OrderBy) .Select(DropdownViewModel.FromProblemGroup); } this.ViewBag.ProblemGroupTypeData = DropdownViewModel.GetEnumValues <ProblemGroupType>(); }
private void PrepareViewBagData() { this.ViewBag.TypeData = DropdownViewModel.GetEnumValues <ContestType>(); this.ViewBag.SubmissionExportTypes = DropdownViewModel.GetEnumValues <SubmissionExportType>(); }
public ActionResult Index() { this.ViewBag.SubmissionStatusData = DropdownViewModel.GetEnumValues <SubmissionStatus>(); return(this.View()); }
public ActionResult RenderGrid(int?id) { this.ViewBag.SubmissionStatusData = DropdownViewModel.GetEnumValues <SubmissionStatus>(); return(this.PartialView("_SubmissionsGrid", id)); }
private void PrepareViewBagData() => this.ViewBag.TypeData = DropdownViewModel.GetEnumValues <ProblemGroupType>();