Misleading description of Value type

Created on 17 December 2018, over 6 years ago
Updated 26 August 2024, 8 months ago

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.

✨ Feature request
Status

Needs review

Version

4.0

Component

Code

Created by

πŸ‡§πŸ‡¬Bulgaria RumyanaRuseva

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024