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

Students with score of zero not appearing in chart. #141

Closed
toonarmycaptain opened this issue Feb 6, 2019 · 1 comment · Fixed by #143
Closed

Students with score of zero not appearing in chart. #141

toonarmycaptain opened this issue Feb 6, 2019 · 1 comment · Fixed by #143
Assignees
Labels
bug Something isn't working

Comments

@toonarmycaptain
Copy link
Owner

When student is given a score of zero, student's avatar not added to chart.
Suspect issue is inherent falsiness of 0 in this line in code for bundling scores with associated avatars. The if statement is suppose to filter out students with no score given, but also filters out 0 scores.

# add avatar to list of avatars for score
if student_score:
student_scores[student_score] = student_scores.get(student_score, []) + [avatar_path]

This could be a desirable feature (not include zeros, or any score below a certain value etc), but would be better implemented optionally and explicitly. Apart from being able to set optionally, implementing such a feature explicitly would prevent unexpected behaviour if the score range includes some negative numbers (eg you lost points while on zero), where scores below and above zero would be included in the chart, but not zeros.

@toonarmycaptain toonarmycaptain added the bug Something isn't working label Feb 6, 2019
@toonarmycaptain toonarmycaptain self-assigned this Feb 6, 2019
@toonarmycaptain
Copy link
Owner Author

GitMate.io thinks possibly related issues are #83 (Add test for student with no score), #139 (Permit charts with same name. ), #68 (Go straight from create class to new chart.), and #18 (Score entry dialogue/logic).

toonarmycaptain added a commit that referenced this issue Feb 6, 2019
Fixes #141

Signed-off-by: David <toonarmycaptain@hotmail.com>
toonarmycaptain added a commit that referenced this issue Feb 7, 2019
Better fix for #141

Signed-off-by: David <toonarmycaptain@hotmail.com>
toonarmycaptain added a commit that referenced this issue Feb 19, 2019
Fixes #141

Signed-off-by: David <toonarmycaptain@hotmail.com>
toonarmycaptain added a commit that referenced this issue Feb 19, 2019
Better fix for #141

Signed-off-by: David <toonarmycaptain@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant