feat: added sort by recent activity for activity stats api (#31252)

Co-authored-by: adeel.tajamul <adeel.tajamul@arbisoft.com>
This commit is contained in:
Muhammad Adeel Tajamul
2022-11-07 11:15:01 +05:00
committed by GitHub
parent 23f49f4607
commit 06ac5ed4b0
3 changed files with 4 additions and 1 deletions

View File

@@ -1700,7 +1700,7 @@ def get_course_discussion_user_stats(
order_by = order_by or UserOrdering.BY_FLAGS
else:
order_by = order_by or UserOrdering.BY_ACTIVITY
if order_by != UserOrdering.BY_ACTIVITY:
if order_by == UserOrdering.BY_FLAGS:
raise ValidationError({"order_by": "Invalid value"})
if not ENABLE_LEARNERS_STATS.is_enabled(course_key):