christopher lee
5b35ab3668
Added optional mark_as_read field to comments in Discussion API
...
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.
2015-08-12 12:25:06 -04:00
Ben McMorran
4a78271851
Move is_commentable_cohorted to django_comment_client
2015-07-30 20:59:34 +00:00
Christopher Lee
384fa77ee6
Merge pull request #8585 from edx/clee/discussion-api-order-and-sort-threads
...
Thread sort key and direction for discussion api
2015-07-28 18:50:48 -04:00
christopher lee
ed3bb27df8
Thread sort key and direction for discussion api
...
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.
2015-07-28 14:34:30 -04:00
David Ormsbee
58f36d3e93
Enable faster ModuleStore tests with SharedModuleStoreTestCase.
...
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)
2015-07-27 13:02:16 -04:00
christopher lee
5d8d1619a0
Added unanswered/unread query params for thread in discussion api
...
Discusion API now takes a view parameter when getting a thread list.
This view parameter only takes "unread" or "unanswered" as possible
values.
2015-07-23 11:41:08 -04:00
Sarina Canelake
ba8fd1c21d
Eliminate instances of unused-import Pylint violation
2015-07-13 17:33:25 -04:00
Greg Price
b8576e74d6
Allow group_id to be set in discussion API
...
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
2015-06-29 11:08:03 -04:00
Christopher Lee
13dbfb8679
Merge pull request #8589 from edx/gprice/discussion-api-abuse-flagged
...
Add abuse flagging to discussion API
2015-06-23 18:08:58 -04:00
Greg Price
52a3306e2a
Add abuse flagging to discussion API
...
Flagging/unflagging is done by issuing a PATCH request on a thread or
comment endpoint with the "abuse_flagged" field set.
2015-06-23 17:22:54 -04:00
Greg Price
54756317f1
Add followed thread retrieval to discussion API
...
This implements the "following" value for the "view" query parameter on
the thread list endpoint.
2015-06-23 13:38:34 -04:00
Christopher Lee
44e13af6be
Merge pull request #8576 from edx/gprice/discussion-api-max-depth
...
Enforce MAX_COMMENT_DEPTH in discussion_api
2015-06-22 13:30:37 -04:00
Greg Price
a77923dc12
Merge pull request #8564 from edx/gprice/discussion-api-whitespace-content
...
Handle whitespace-only content in discussion API
2015-06-19 13:04:47 -04:00
Greg Price
6cd8889f9f
Merge pull request #8562 from edx/gprice/discussion-api-editable-fields
...
Add editable_fields to discussion API responses
2015-06-19 12:57:31 -04:00
Greg Price
7fcf4e3d8d
fixup! Enforce MAX_COMMENT_DEPTH in discussion_api
...
Add more extensive testing
2015-06-19 12:48:11 -04:00
Greg Price
16d7a81b96
Add editable_fields to discussion API responses
...
This will allow clients to determine what actions (e.g. following,
endorsing, and editing content) a user can take on a piece of content.
2015-06-19 12:02:21 -04:00
Greg Price
174b4d943a
Handle whitespace-only content in discussion API
...
The comments service rejects whitespace-only content for certain
strings, so the discussion API should also reject such content.
2015-06-19 12:01:34 -04:00
Greg Price
f47ab2bb18
Enforce MAX_COMMENT_DEPTH in discussion_api
2015-06-18 17:18:02 -04:00
Greg Price
6505713302
Fix discussion_api to handle old threads
...
Some old threads do not have the pinned field set, which the thread
serializer should handle.
2015-06-18 11:25:22 -04:00
Greg Price
7c53400134
Merge pull request #8541 from edx/gprice/discussion-api-rendered-body
...
Add rendered_body to discussion API endpoints
2015-06-17 22:51:38 -04:00
Greg Price
c28b295806
Add rendered_body to discussion API endpoints
...
The rendering in this commit does not prevent MathJax content from being
rendered as the discussion JavaScript code does.
2015-06-17 20:23:30 -04:00
Greg Price
82b117f66e
Merge pull request #8543 from edx/gprice/discussion-api-comment-vote
...
Add comment voting to discussion API
2015-06-17 19:41:08 -04:00
Greg Price
de68c30486
Merge pull request #8530 from edx/gprice/discussion-api-text-search
...
Add text_search parameter to discussion API
2015-06-17 11:35:12 -04:00
Greg Price
fecbdcd052
Add text_search parameter to discussion API
...
The thread list endpoint now accepts the text_search parameter and also
includes a text_search_rewrite field in its responses.
2015-06-17 10:20:13 -04:00
Greg Price
0998df8c4b
Add comment voting to discussion API
2015-06-16 23:32:48 -04:00
Greg Price
905512b6c8
Merge pull request #8505 from edx/gprice/discussion-api-course-endpoint
...
Add discussion API course endpoint
2015-06-16 13:04:16 -04:00
Greg Price
d18b24b051
Add discussion API course endpoint
...
This endpoint returns course metadata relating to discussions as a
starting point for clients.
2015-06-16 11:27:54 -04:00
Greg Price
5318f21e77
Merge pull request #8485 from edx/gprice/discussion-api-endorse
...
Add comment endorsement to discussion API
2015-06-15 17:10:05 -04:00
Greg Price
3c48585c8e
Fix bug in discussion API comment update
...
This bug caused any attempt to update a comment with a non-null
parent_id to result in a 500 error without applying the update. The bug
was introduced in commit 2c7590d197 .
2015-06-15 12:20:47 -04:00
christopher lee
205c735865
Added comment deletion in the discussion API
2015-06-11 14:09:02 -04:00
Greg Price
ef26e8e83f
Add comment endorsement to discussion API
2015-06-11 12:28:57 -04:00
Greg Price
895731f526
Add comment editing to discussion API
...
This is done via PATCH on a comment instance endpoint.
2015-06-11 11:39:01 -04:00
Greg Price
b91287bfe3
Merge pull request #8425 from edx/gprice/discussion-api-parent-id
...
Use parent_id returned from the comments service
2015-06-09 09:33:17 -04:00
Greg Price
2c7590d197
Use parent_id returned from the comments service
...
This depends on cs_comments_service commit 0487891.
2015-06-08 16:59:21 -04:00
christopher lee
30884d192b
Added delete thread in discussion api
2015-06-08 15:43:39 -04:00
Greg Price
37ebbc45e3
Add thread voting to discussion API
2015-06-05 16:12:54 -04:00
Greg Price
6c2df96c5f
Merge pull request #8372 from edx/gprice/discussion-api-follow-thread
...
Add ability to follow a thread in discussion API
2015-06-05 14:12:29 -04:00
Greg Price
9ff8749716
Add ability to follow a thread in discussion API
2015-06-05 13:20:57 -04:00
Nimisha Asthagiri
d240785b17
MA-722 Render xBlock API Support
2015-06-05 11:18:48 -04:00
Greg Price
73d891313a
Add thread editing to discussion API
...
This is done via PATCH on a thread instance endpoint.
2015-06-04 10:56:43 -04:00
Christopher Lee
103ae47759
Merge pull request #8199 from edx/clee/get_topic_threads
...
MA-642 Add topic_id query to discussion/thread api
2015-06-03 12:29:05 -04:00
christopher lee
f552eca7d6
MA-642 Add topic_id query to discussion/thread api
...
Also added thread_list_url field.
2015-06-03 11:29:48 -04:00
Diana Huang
dae137feaa
Convert all tabs to the new plugin framework.
2015-06-02 15:05:16 -04:00
Greg Price
8fbfa2398e
Add comment creation to discussion API
2015-05-29 11:05:02 -04:00
Greg Price
df3e6535dc
Add "following" parameter to thread creation
...
This allows authors to follow the thread immediately upon creation.
2015-05-27 10:58:14 -04:00
Greg Price
f891450f50
Add thread creation to discussion API
...
Also, fix the field-specific error format for all API endpoints.
This requires cs_comments_service commit fdf017c918.
2015-05-26 12:42:40 -04:00
Greg Price
c83f56153e
Add comment list URLs to discussion api threads
2015-05-21 15:03:02 -04:00
Greg Price
c65893e9e0
Add endorsement fields to comment list API
2015-05-21 11:35:39 -04:00
Greg Price
2451e06788
Add comment list endpoint to Discussion API
2015-05-20 13:13:19 -04:00
Greg Price
7309352ef7
Refactor discussion API to use DRF serializer
...
This will make it easier to add the creation and update interfaces.
2015-05-18 14:03:02 -04:00