Beispiel #1
0
        public bool CheckSubmissionInfo()
        {
            // Check if all teams in TeamList;
            var r = new ReturnSummary("No team found in team definition.\nSubmission ID with error: ");

            foreach (var submission in SubmissionWithResultsList)
            {
                if (TeamsList.Exists(x => x.id == submission.team_id) == false)
                {
                    r.RetStatus = false;
                    r.ErrList.Add(submission.id);
                }
            }
            ReturnSummaryList.Add(r);
            // Check if all problems in ProblemList;
            var r1 = new ReturnSummary("No problem found in problem definition.\nSubmission ID with error: ");

            foreach (var submission in SubmissionWithResultsList)
            {
                if (ProblemsList.Exists(x => x.id == submission.problem_id) == false)
                {
                    r1.RetStatus = false;
                    r1.ErrList.Add(submission.id);
                }
            }
            ReturnSummaryList.Add(r1);
            // Return submission info check result
            return(r.RetStatus && r1.RetStatus);
        }
Beispiel #2
0
        public bool CheckTeamInfo()
        {
            // Check if all group id in GroupList
            var r = new ReturnSummary("No group ID found in group definition.\nTeam ID with error: ");

            foreach (var team in TeamsList)
            {
                foreach (var gid in team.group_ids)
                {
                    if (GroupsList.Exists(x => x.id == gid) == false)
                    {
                        r.RetStatus = false;
                        r.ErrList.Add(team.id);
                    }
                }
            }
            ReturnSummaryList.Add(r);
            // Check if all school id in SchoolList
            var r1 = new ReturnSummary("No organization ID found in organization definition.\nTeam ID with error: ");

            foreach (var team in TeamsList)
            {
                if (SchoolsList.Exists(x => x.id == team.organization_id) == false)
                {
                    r1.RetStatus = false;
                    r1.ErrList.Add(team.id);
                }
            }
            ReturnSummaryList.Add(r1);
            // Return team info check result
            return(r.RetStatus && r1.RetStatus);
        }
Beispiel #3
0
        public bool CheckUnjudgedRuns()
        {
            // Check if all submissions have judge result;
            var r = new ReturnSummary("No judge result found in these submissions.\nSubmission ID without judge result: ");

            foreach (var submission in SubmissionWithResultsList)
            {
                if (submission.judgeResult is null or "")
                {
                    r.RetStatus = false;
                    r.ErrList.Add(submission.id);
                }
            }
            ReturnSummaryList.Add(r);
            // Return submission info check result
            return(r.RetStatus);
        }