diff --git a/lms/djangoapps/discussion/rest_api/api.py b/lms/djangoapps/discussion/rest_api/api.py index 50461dd2b255..5a104bba43b7 100644 --- a/lms/djangoapps/discussion/rest_api/api.py +++ b/lms/djangoapps/discussion/rest_api/api.py @@ -873,7 +873,7 @@ def get_thread_list( } if view: - if view in ["unread", "unanswered"]: + if view in ["unread", "unanswered", "unresponded"]: query_params[view] = "true" else: ValidationError({ diff --git a/lms/djangoapps/discussion/rest_api/forms.py b/lms/djangoapps/discussion/rest_api/forms.py index 3663b41738bc..c7aa8c894b13 100644 --- a/lms/djangoapps/discussion/rest_api/forms.py +++ b/lms/djangoapps/discussion/rest_api/forms.py @@ -59,7 +59,7 @@ class ThreadListGetForm(_PaginationForm): count_flagged = ExtendedNullBooleanField(required=False) flagged = ExtendedNullBooleanField(required=False) view = ChoiceField( - choices=[(choice, choice) for choice in ["unread", "unanswered"]], + choices=[(choice, choice) for choice in ["unread", "unanswered", "unresponded"]], required=False, ) order_by = ChoiceField( diff --git a/lms/djangoapps/discussion/rest_api/tests/test_views.py b/lms/djangoapps/discussion/rest_api/tests/test_views.py index 118b4fcc291f..400c1be4aa11 100644 --- a/lms/djangoapps/discussion/rest_api/tests/test_views.py +++ b/lms/djangoapps/discussion/rest_api/tests/test_views.py @@ -955,7 +955,7 @@ def test_basic(self): "per_page": ["10"], }) - @ddt.data("unread", "unanswered") + @ddt.data("unread", "unanswered", "unresponded") def test_view_query(self, query): threads = [make_minimal_cs_thread()] self.register_get_user_response(self.user) diff --git a/lms/djangoapps/discussion/rest_api/views.py b/lms/djangoapps/discussion/rest_api/views.py index c04fc7e48471..6831765fbf87 100644 --- a/lms/djangoapps/discussion/rest_api/views.py +++ b/lms/djangoapps/discussion/rest_api/views.py @@ -361,7 +361,7 @@ class ThreadViewSet(DeveloperErrorViewMixin, ViewSet): * view: "unread" for threads the requesting user has not read, or "unanswered" for question threads with no marked answer. Only one - can be selected. + can be selected, or unresponded for discussion type posts with no response * requested_fields: (list) Indicates which additional fields to return for each thread. (supports 'profile_image')