Метод | Описание | |
---|---|---|
AddGroup ( int contestId, |
Adds a group to a group Contest; will fail if a group is added to an individual contest.
|
|
AddUser ( int contestId, |
Adds a user to the Contest.
|
|
CalculateContestReward ( int days, int teams ) : int |
Calculates the reward for a time-based contest.
|
|
CleanUp ( ) : void |
Cleans up the contest list, deactivating expired time-based contests and deleting deactivated contests that have reached the end of their retainment period.
|
|
CreateContest ( ContestType type, string name, string description, System.DateTime start, System.DateTime end, bool searchable, Statistic statistic, int creatorId ) : int |
Creates a new time-based Contest
|
|
CreateContest ( ContestType type, string name, string description, System.DateTime start, float end, bool searchable, Statistic statistic, int creatorId ) : int |
Creates a new goal-based Contest
|
|
DistributeContestReward ( int contestId ) : void |
Distributes the ActivityScore reward for a contest and deactivates it.
|
|
GetContest ( int id, bool loadTeams, bool loadTeamMembers ) : Contest |
Retrieves a Contest based on its ID.
|
|
GetTeamsToDisplay ( ContestTeam userTeam, Contest contest ) : List |
Finds the list of teams that should be displayed to the user as part of the contest standings report. For the user's current bracket, the user's team will be shown. For brackets better than the user's current standing, the lowest team in the bracket is shown (the team that the user needs to pass to enter that bracket). For brackets worse than the user's current standing, the top team in the bracket is shown (the team that the user needs to stay ahead of to avoid falling into that bracket).
|
|
LockContest ( int contestId ) : void |
Locks competitor initial values such that the calculation of deltas can begin (to calculate team scores).
|
|
RemoveGroup ( int contestId, |
Removes a group from a Contest.
|
|
RemoveUser ( int contestId, |
Adds a user to the Contest.
|
|
UpdateTeamScore ( int teamId ) : void | ||
UserCompetingInContest ( int userId, int contestId ) : bool |
Queries the DB to see if a user is registered for a particular contest.
|
Метод | Описание | |
---|---|---|
CalculateEstimatedLengthInDays ( Contest contest ) : int |
Returns the length of a contest of a time-based contest, and estimates the length of a goal-based contest.
|
|
ContestManager ( ) : System |
Private constructor, can not instantiate.
|
public static AddGroup ( int contestId, |
||
contestId | int | ID for the contest the group should be added to. |
group | Group to be added. | |
Результат | bool |
public static AddUser ( int contestId, |
||
contestId | int | |
user | User to be added. | |
Результат | void |
public static CalculateContestReward ( int days, int teams ) : int | ||
days | int | Duration of the contest, in days. |
teams | int | Number of teams competing in the contest. |
Результат | int |
public static CreateContest ( ContestType type, string name, string description, System.DateTime start, System.DateTime end, bool searchable, Statistic statistic, int creatorId ) : int | ||
type | ContestType | Determines whether the contest in Individual or Group-based. |
name | string | Contest Name. |
description | string | Contest Description. |
start | System.DateTime | Time to start the contest. |
end | System.DateTime | Time to end the contest. |
searchable | bool | True if the Contest can be found by searching (public), false if private. |
statistic | Statistic | Statistic on which the Contest is based. |
creatorId | int | UserID of the creator of the contest. |
Результат | int |
public static CreateContest ( ContestType type, string name, string description, System.DateTime start, float end, bool searchable, Statistic statistic, int creatorId ) : int | ||
type | ContestType | Determines whether the contest in Individual or Group-based. |
name | string | Contest Name. |
description | string | Contest Description. |
start | System.DateTime | Time to start the contest. |
end | float | Score at which to end the contest. |
searchable | bool | True if the Contest can be found by searching (public), false if private. |
statistic | Statistic | Statistic on which the Contest is based. |
creatorId | int | UserID of the creator of the contest. |
Результат | int |
public static DistributeContestReward ( int contestId ) : void | ||
contestId | int | ID of the contest to process. |
Результат | void |
public static GetContest ( int id, bool loadTeams, bool loadTeamMembers ) : Contest | ||
id | int | ID of the Contest to be retrieved. |
loadTeams | bool | |
loadTeamMembers | bool | |
Результат | ActivEarth.Objects.Competition.Contests.Contest |
public static GetTeamsToDisplay ( ContestTeam userTeam, Contest contest ) : List |
||
userTeam | ActivEarth.Objects.Competition.Contests.ContestTeam | Team that the current user is on. |
contest | ActivEarth.Objects.Competition.Contests.Contest | Contest to be analyzed. |
Результат | List |
public static LockContest ( int contestId ) : void | ||
contestId | int | |
Результат | void |
public static RemoveGroup ( int contestId, |
||
contestId | int | ID for the contest the group should be removed from. |
group | Group to be removed. | |
Результат | bool |
public static RemoveUser ( int contestId, |
||
contestId | int | |
user | User to be added. | |
Результат | bool |
public static UpdateTeamScore ( int teamId ) : void | ||
teamId | int | |
Результат | void |
public static UserCompetingInContest ( int userId, int contestId ) : bool | ||
userId | int | ID of the user. |
contestId | int | ID of the contest to query. |
Результат | bool |