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

fix: exclude anonymous posts in build_course_stats #424

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

ayesha-waris
Copy link
Contributor

INF-887

Explanation:

When a user makes their first non-anonymous post, the system uses the "build_course_stats" function to create a new set of statistics for that user. However, there is a problem with the current implementation of the function. It counts all the posts made by a specific user, including those that are anonymous or were made anonymously to peers, before the user made their first non-anonymous post. This leads to an inaccurate count of the user's threads being saved in the database. In other words, the function doesn't filter out the posts made before the user started posting non-anonymously, causing the stored count to be incorrect.

Note: this fix is not backward compatible as that would require direct changes to the database.

Copy link

codecov bot commented Jan 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (20cd380) 96.15% compared to head (25f8093) 96.16%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #424      +/-   ##
==========================================
+ Coverage   96.15%   96.16%   +0.01%     
==========================================
  Files          58       58              
  Lines        4573     4588      +15     
==========================================
+ Hits         4397     4412      +15     
  Misses        176      176              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@asadazam93 asadazam93 merged commit 0def92c into master Jan 8, 2024
5 checks passed
@asadazam93 asadazam93 deleted the Ayesha/INF-887 branch January 8, 2024 11:46
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 this pull request may close these issues.

4 participants