Commit Graph

21 Commits

Author SHA1 Message Date
KyryloKireiev
258f3fc8a0 fix: [FC-0031] Add limit the number of returned results for mobile_search 2023-11-01 17:07:52 +02:00
Yusuf Musleh
4ad8ba1b41 feat: list courses details by keys
This adds the ability to get a list of detailed courses based on their
keys provided in the newly added `keys` query param in the `GET /courses/v1/courses/`
endpoint.
2023-07-12 17:22:38 +03:00
Syed Muhammad Dawoud Sheraz Ali
d2fd26ee91 feat: the ability to filter active courses in course listing api (#31502)
* feat: the ability to filter active courses in course listing api
2023-01-09 20:37:30 +05:00
Jawayria
59002b5702 chore: Applied lint-amnesty on lms/djangoapps/{course_api, course_blocks} 2021-12-17 16:05:40 +05:00
J. Victor Martins
6adf45df2f feat: Add permissions filter to list courses API
The new filter, called `permissions`, allows callers to filter courses
per access granted to the specified username.  Callers can now filter
courses per roles, actions, etc.
2021-09-07 14:41:50 -07:00
Usama Sadiq
afa102e125 refactor: ran pyupgrade on lms/djangoapps/course_api (#26735) 2021-03-09 12:54:42 +05:00
Jawayria
e9b167e1fd Applied pylint-amnesty to course_api 2021-02-04 13:22:45 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Robert Raposa
9fa5443379 add course_ids api
Adds a course_ids api that can filter by user role, since the courses
api could not perform well enough for this, and returned much more
data than we need.

Additionally, adds a LazyPageNumberPagination to provide more accurate
counts in the pagination response when using LazySequence with the
queryset.

BOM-897
2020-01-31 18:02:16 -05:00
Feanil Patel
79d097d3c8 Remove the role parameter from the courses api.
BOM-1228

The api is already not very performant and trying to limit it to only
show courses where you are staff causes the code to iterate over almost
all the courses and times out before it returns any results to the user.

The plan is to build a different api for the thing we need that will
just provide the course IDs for courses where you are staff and sholud
be much faster.
2020-01-29 16:38:19 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Julia Eskew
a2dac21843 Add optional role parameter to course API endpoint. (#21059)
* Add optional role parameter to course API endpoint.

* fixup! Add optional role parameter to course API endpoint.
2019-08-02 12:52:30 -04:00
Stu Young
090b8ed011 incr-285 (#20592)
* run python modernize

* run isort

* quality
2019-05-16 12:42:56 -04:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
Stuart Young
1fd2167144 rebalance python unittests onto new shards 2018-05-03 11:16:05 -04:00
Omar Al-Ithawi
fc7f98362d Add search for courses API 2018-02-17 17:23:05 +02:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Sanford Student
6490551f1b MA-2103 2016-03-08 16:17:01 -05:00
Nimisha Asthagiri
8e3f4e058d Update Course Catalog API to support filters 2015-12-23 12:31:31 -05:00