This specifically enables/disables the underlying comment service client
used to make calls to the service. When disabled, this client will now
throw an exception which can be propagated upwards so that callers can
make the right decision about how to notify users of the error, or
handle retry, etc etc.
- Default of "desc" is all that is in use, and remains as-is.
- Discussion API keeps order_direction param, to minimize changes,
but it only accepts "desc".
- Discussion webapp simply no longer sends in the sort order.
We're often grabbing the metadata of a specific thread to then be able
to perform other operations, but we never need the actual responses or
comments of a thread unless we're displaying it in the normal forum
view.
This change sets a default of with_responses=False, which instructs the
comment service to not send back the responses/comments for the given
thread. We only ask for responses in the case of rendering a single
thread or inline discussion.
MA-1212 - added response count field in tests
removed unneccessary function
"MA-1212 - added response count in thread retrieval service and updated tests"
updated serializerz test for response count
MA-1212
exclude response count from thread get list
removed response_count field from update and create thread services
made resp_total dynamic for cs thread in test_serielizer
quality fixed
improved quality
add TODO JIRA ticket on removed fields
Currently when GETting comments, the thread of the comment will be
marked as read. This change makes this effect optional as well as
setting the default to not mark the thread as read.
Discussion API for thread sorting now takes the sort_by
parameter for the sort key such as by comment_count or
vote_count. Also takes the sort_direction parameter for
sorting the thread results.
This is a new TestCase base class, intended for situations where
you only want to initialize course content in the setUpClass(),
as opposed to setUp(). This is done for performance reasons, since
many test cases only use courses in a read-only fashion,
particularly in LMS tests.
This commit also converts the following modules to use this new
base class:
lms/djangoapps/ccx/tests/test_ccx_modulestore.py (38s -> 4s)
lms/djangoapps/discussion_api/tests/test_api.py (2m45s -> 51s)
lms/djangoapps/teams/tests/test_views.py (1m17s -> 33s)
This also fixes two bugs:
* A thread created by a non-privileged user in a cohorted course would
not have group_id set
* Any user could set the endorsed field on creation of a comment