Closed rbento1096 closed 7 months ago
Users should also be blocked from voting on own country
spotGuard
) vote so you avoid people signing up with fake accounts just to vote. Vote must be anonymous
@rbento1096
I'll keep the internal name generic to "contest" (instead of Erasmus of the Year), to be more flexible for possible changes in the next editions.
/**
* A contest to which people can vote in.
*/
export class Contest extends Resource {
/**
* The ID of the contest.
*/
contestId: string;
/**
* Whether the contest is enabled and therefore shown in the menu.
*/
enabled: boolean;
/**
* If set, the vote is active (users can vote) and ends at the configured timestamp.
*/
voteEndsAt?: epochISOString;
/**
* Name of the contest.
*/
name: string;
/**
* Description of the contest.
*/
description: string;
/**
* The candidates of the contest (vote ballots).
*/
candidates: ContestCandidate[];
/**
* The count of votes for each of the sorted candidates.
* Note: the order of the candidates list must not change after a vote is open.
* This attribute is not accessible to non-admin users until `publishedResults` is true.
*/
results?: number[];
/**
* Whether the results are published and hence visible to any users.
*/
publishedResults: boolean;
}
/**
* A candidate in a contest.
*/
export class ContestCandidate extends Resource {
/**
* The name of the candidate.
*/
name: string;
/**
* An URL where to find more info about the candidate.
*/
url: string;
/**
* The country of the candidate.
* This is particularly important beacuse, if set, users can't vote for candidates of their own countries.
*/
country: string;
}
I assume that the permissions needed to manage the contest is "canManageContents".
Can any kind of user vote? Or only registered ones, only ESNers, etc.?
Only registered ESNers
This means that once the vote is cast, you can't change it anymore, and you can't even see what you voted for yourself. Is that cool?
Yes, exactly! :)
You can test the new feature on the dev environment.
As anticipated, I created a more general structure to allow multiple contests — not only the Destination of the Year. This way, we can enhance user engagement on the app via silly/informal/formal contests throughout the event.
As a user I'd like to be able to vote for this year's Erasmus Destination of the Year As an admin/CT I'd like to be able to insert this year's candidate destinations through a dedicated UI. Users should also be blocked from voting on own country Vote must be anonymous