Problem/Motivation

When adding/editing a vote type in /admin/structure/vote-types, the site builder does not know what Value type is, and how it's used. We cannot currently use select options widget, because modules may define new value types.

Proposed resolution

Just extend the description to include the suggested values. According to API.txt:
VotingAPI supports three value types by default: 'percent' votes are averaged, 'points' votes are summed up, and 'option' votes get a count of votes cast for each specific option. Modules can use other value_types, but must implement their own calculation functions to generate vote results -- more on that later.

Remaining tasks

Possibly extend the VoteResultFunction plugins to define what vote types they support. This will allow to:
1. Change the 'Value Type' filed into a select field with all available options from VoteResultFunction plugins.
2. Update the performAndStore() function to calculate results differently depending on the vote type. For example, 'percent' and 'option' votes should not be summed.

Comments

RumyanaRuseva created an issue. See original summary.

RumyanaRuseva’s picture

Status: Active » Needs review
StatusFileSize
new960 bytes

Here is a patch with updated description.

tr’s picture

Version: 8.x-3.x-dev » 4.0.x-dev
Category: Bug report » Feature request