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

Report Groups error percent response #187

Open
helbertds opened this issue Apr 4, 2019 · 1 comment
Open

Report Groups error percent response #187

helbertds opened this issue Apr 4, 2019 · 1 comment
Assignees

Comments

@helbertds
Copy link

Error Percent calculated for all responses when group selected, ignore participants in group selected. The sum of percent options not is 100%.

Error Print:
Captura de Tela 2019-04-04 às 15 13 33

Fix Print:
Captura de Tela 2019-04-04 às 15 13 47

To Fix:
File: /mod/questionnaire/classes/response/base.php
Line Error: $percent = round((float)$num / (float)$respondents * 100.0);
Line Fix: $percent = round((float)$num / (float)$participants * 100.0);

Solution: change variable $respondents to $participants

@mchurchward
Copy link
Contributor

I think the problem is that $respondents for a group selection should be the number of respondents in the group, and not all the groups. Then, we also wouldn't see "6/3".

@mchurchward mchurchward self-assigned this Apr 9, 2019
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

No branches or pull requests

2 participants