Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: vote erasmus destination of the year #81

Closed
rbento1096 opened this issue Nov 12, 2023 · 4 comments · Fixed by #133
Closed

Feat: vote erasmus destination of the year #81

rbento1096 opened this issue Nov 12, 2023 · 4 comments · Fixed by #133
Assignees
Milestone

Comments

@rbento1096
Copy link
Collaborator

rbento1096 commented Nov 12, 2023

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

@rbento1096 rbento1096 added idea Ideas to validate To discuss Requires additional discussion/brainstorming labels Nov 12, 2023
@rbento1096 rbento1096 added this to the EGM 2.0 milestone Nov 12, 2023
@rbento1096 rbento1096 removed idea Ideas to validate To discuss Requires additional discussion/brainstorming labels Mar 20, 2024
@uatisdeproblem uatisdeproblem self-assigned this Mar 23, 2024
@uatisdeproblem
Copy link
Owner

uatisdeproblem commented Mar 24, 2024

Users should also be blocked from voting on own country

  1. Can any kind of user vote? Or only registered ones, only ESNers, etc.?
    • I would suggest only letting registered users (with a spot — spotGuard) vote so you avoid people signing up with fake accounts just to vote.
  2. If any user can vote, a user without a Country (e.g. Guests) can vote for anything, right?

Vote must be anonymous

  1. 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?

@rbento1096

@uatisdeproblem
Copy link
Owner

uatisdeproblem commented Mar 24, 2024

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".

@rbento1096
Copy link
Collaborator Author

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! :)

@uatisdeproblem
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants