Beispiel #1
0
        public async Task <IActionResult> ChangeExpected(int pid, int sid, ChangeExpectedModel model)
        {
            var it = await Submissions.FindAsync(sid);

            if (it == null || it.ProblemId != pid)
            {
                return(NotFound());
            }

            it.ExpectedResult = model.Verdict == -1 ? default(Verdict?) : (Verdict)model.Verdict;
            it.Language       = model.Language;
            await Submissions.UpdateAsync(it);

            return(RedirectToAction(nameof(Detail)));
        }