Adds tests and functionality to support filtering the results returned
from team_membership endpoint with optional course_id parameter. Will
return 400 Bad Request in the event that the given course_id does not
match up with the provided team_id (team.course_id does not match), or
if the user is not enrolled in the course given.
Documentation has been added to the relevant API page on the wiki:
https://openedx.atlassian.net/wiki/display/TNL/Team+API
Create read-only serializer to handle User/UserProfile data
together.
Refactor GET accounts to use the new read-only joint serializer
Fix tests to check for new expanded user info
Update tests in teams/tests/test_views.py to test for both
public and private profiles on expands user
Update serializer to utilize the request object for creating absolute uris
Adds a read-only mode to the discussion module which disables any
controls for updating the discussion (votes, follows, replies,
etc). This mode is enabled for users who are not a member of the team,
and are also not moderators, admins, or community TAs.
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)
TNL-1898
Also adds a generic paginated list view and Teams list view. The
common PaginatedView takes a collection and a view class for its items
and creates a header and footer with correct pagination. The topics
list view is refactored to use this generic view.
Authors:
- Peter Fogg <pfogg@edx.org>
- Daniel Friedman <dfriedman58@gmail.com>