Commit a6c73638 by Ibrahim Awwal

Allow sorting followed threads (works same as sorting anything else).

parent 8915c1d0
...@@ -287,8 +287,8 @@ def followed_threads(request, course_id, user_id): ...@@ -287,8 +287,8 @@ def followed_threads(request, course_id, user_id):
query_params = { query_params = {
'page': request.GET.get('page', 1), 'page': request.GET.get('page', 1),
'per_page': THREADS_PER_PAGE, # more than threads_per_page to show more activities 'per_page': THREADS_PER_PAGE, # more than threads_per_page to show more activities
'sort_key': 'date',#TODO: Allow custom sorting? 'sort_key': request.GET.get('sort_key', 'date'),
'sort_order': 'desc', 'sort_order': request.GET.get('sort_order', 'desc'),
} }
threads, page, num_pages = profiled_user.subscribed_threads(query_params) threads, page, num_pages = profiled_user.subscribed_threads(query_params)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment