Skip to content

Commit ab2605b

Browse files
authored
Merge pull request #1558 from SoftUni-Internal/v2-development
Merge dev into main. Integrate latest bugfixes and improvements.
2 parents 29554a1 + ac29c94 commit ab2605b

File tree

179 files changed

+8365
-5905
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+8365
-5905
lines changed

Common/OJS.Common/Enumerations/ContestType.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ public enum ContestType
66
OnsitePracticalExam = 1,
77
OnlinePracticalExam = 2,
88
Lab = 3,
9+
OnsitePracticalExamWithRandomTasks = 4,
910
}
1011
}

Common/OJS.Common/Resources.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ public static class ProblemGroupsControllers
157157
{
158158
public const string ActiveContestCannotAddProblemGroup = "The contest is аctive and you cannot add problem groups";
159159
public const string ActiveContestCannotDeleteProblemGroup = "The contest is аctive and you cannot delete problem groups";
160-
public const string CanCreateOnlyInOnlineContest = "You can create problem groups only in a contest which is of type {0}";
161-
public const string CanEditOrderbyOnlyInOnlineContest = "You can edit problem groups order only in a contest which is of type {0}.";
160+
public const string CanCreateOnlyInContestWithRandomTasks = "You can create problem groups only in a contest with random tasks";
161+
public const string CanEditOrderByOnlyInContestWithRandomTasks = "You can edit problem groups order only in a contest with random tasks.";
162162
public const string ContestDoesNotExist = "The selected contest does not exist";
163163
public const string ContestRequired = "Contest is required";
164164
public const string CopyAllProblemGroupsSuccessMessage = "Successfully copied all problem groups from the contest \"{0}\" into the contest \"{1}\"";

Data/OJS.Data.Models/Contests/Contest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ public bool ResultsArePubliclyVisible
130130
public bool HasPracticePassword => this.PracticePassword != null;
131131

132132
[NotMapped]
133-
public bool IsOnlineExam => this.Type == ContestType.OnlinePracticalExam;
133+
public bool IsOnlineExam => this.Type is ContestType.OnlinePracticalExam;
134134

135135
[NotMapped]
136-
public bool IsOnsiteExam => this.Type == ContestType.OnsitePracticalExam;
136+
public bool IsWithRandomTasks => this.Type is ContestType.OnlinePracticalExam or ContestType.OnsitePracticalExamWithRandomTasks;
137137

138138
[NotMapped]
139-
public bool IsExam => this.IsOnlineExam || this.IsOnsiteExam;
139+
public bool IsOnsiteExam => this.Type is ContestType.OnsitePracticalExam;
140140

141141
public static IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
142142
{

Data/OJS.Data.Models/Submissions/Submission.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ public class Submission : DeletableAuditInfoEntity<int>
5151
[StringLength(ConstraintConstants.Submission.WorkerNameMaxLength)]
5252
public string? WorkerName { get; set; }
5353

54+
public ExceptionType? ExceptionType { get; set; }
55+
5456
[NotMapped]
5557
public bool IsBinaryFile => !string.IsNullOrWhiteSpace(this.FileExtension);
5658

0 commit comments

Comments
 (0)