Commit Graph

172 Commits

Author SHA1 Message Date
Matthew Piatetsky
51b991c128 fix bug and add temporary waffle flag 2019-04-09 15:38:55 -04:00
Matthew Piatetsky
064f041276 Revert "Revert both" 2019-04-09 11:04:10 -04:00
Matthew Piatetsky
be9eb46364 Revert "handle missing fields on access denied blocks"
This reverts commit 418540b713.
2019-04-08 12:13:30 -04:00
Matthew Piatetsky
418540b713 handle missing fields on access denied blocks 2019-04-03 12:32:35 -04:00
Matthew Piatetsky
c77ba984c9 fix traversal bug and keep current behavior as default 2019-03-28 15:50:05 -04:00
Matthew Piatetsky
1f6cd7aa5a Revert "Revert "REVMI-62 Return gated blocks in the course blocks API response with an authorization denial reason"" 2019-03-28 14:44:05 -04:00
Matthew Piatetsky
8eae694566 Revert "REVMI-62 Return gated blocks in the course blocks API response with an authorization denial reason" 2019-03-27 16:30:37 -04:00
Matthew Piatetsky
e6b55ede3d Merge pull request #20003 from edx/mobile-access-denied
REVMI-62 Return gated blocks in the course blocks API response with an authorization denial reason
2019-03-26 17:33:57 -04:00
Matthew Piatetsky
4bb539c9aa update user partition and access_denied_message_filter transformers 2019-03-26 15:26:59 -04:00
Calen Pennington
d23e888316 Revert "Reapply "Improve the performance of access checking for a specific user in CourseViewList by prefetching data""
This reverts commit 6059e21bff.
2019-03-21 14:26:00 -04:00
Calen Pennington
b89ce526ca Revert "Batch queries to fetch all courses to prevent over-fetching during paging operations"
This reverts commit 544c7f7eff.
2019-03-21 14:26:00 -04:00
Calen Pennington
544c7f7eff Batch queries to fetch all courses to prevent over-fetching during paging operations 2019-03-19 10:30:33 -04:00
Calen Pennington
6059e21bff Reapply "Improve the performance of access checking for a specific user in CourseViewList by prefetching data"
This reverts commit d8cd6135a6.
2019-03-18 15:24:40 -04:00
Calen Pennington
d8cd6135a6 Revert "Improve the performance of access checking for a specific user in CourseViewList by prefetching data"
This reverts commit a2a340bcd0.
2019-03-14 10:31:24 -04:00
Calen Pennington
5d3c9b36df Merge pull request #19964 from cpennington/fbe-query-perf
Sort in python and add an index to improve StackedConfigModel.current…
2019-03-11 12:22:59 -04:00
Calen Pennington
a2a340bcd0 Improve the performance of access checking for a specific user in CourseViewList by prefetching data 2019-03-11 10:37:53 -04:00
Matthew Piatetsky
74bcc29417 Remove FEATURE_BASED_ENROLLMENT_GLOBAL_KILL_FLAG 2019-03-07 15:46:33 -05:00
Matthew Piatetsky
49ae6b9d73 Remove CONTENT_TYPE_GATING flag 2019-03-07 15:46:33 -05:00
David Ormsbee
76620e0bf2 Add cookie size monitoring New Relic metrics.
This adds middleware that will create custom parameter metrics in
New Relic to track the size of all the cookies being received for
our domain. The custom fields are "cookies_total_size" and a
separate named parameter for every cookie size, e.g.
"cookies.csrftoken.size".

This is intended to help us track cookie growth and better diagnose
issues where users lose their sessions. It is toggled by the
'request_utils.capture_cookie_sizes' Waffle Flag.
2019-02-22 18:18:41 -05:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
Calen Pennington
829227ade3 Merge pull request #19663 from cpennington/fbe-improve-course-api-performance
Fbe improve course api performance
2019-02-06 11:01:25 -05:00
Calen Pennington
43d975a92a Select related CourseOverview.image_set when loading the course_api 2019-02-06 10:11:16 -05:00
Calen Pennington
419657d7a5 Prefetch course modes used in has_access calls in course api 2019-02-06 10:11:15 -05:00
Calen Pennington
6d22866e78 Cache org-site lookups in the RequestCache 2019-02-06 10:11:15 -05:00
Calen Pennington
6c596f7c49 Allow courses api to return data incrementally
Prior to this commit, the course api (/api/courses/v1/courses/)
performed all the work necessary to return all courses available
to the user, and then only actually returned on page's worth of those
courses.

With this change, the api now does the work incrementally, computing
only the data needed to fetch the courses up to and including the page
being returned. This still increases approximately linearly as
the page number accessed being increases, but should be more cache-friendly.
One side effect of this is that the max_page reported by pagination
will be an overestimate (it will include pages that are removed due
to a users access restrictions).

This change also changes the sort-order of courses being returned by the
course_api. By sorting by course-id, rather than course-number, we
can sort in the database, rather than in Python, and defer loading data
from the end of the list until it is requested.

REVMI-90
2019-02-06 10:11:15 -05:00
Calen Pennington
9ff9c33f59 Add a test that shows how bad course api query counts are 2019-02-06 10:11:15 -05:00
Matthew Piatetsky
6e81c84d8b fix unicode strings in lms/ part 1 2019-02-05 15:15:02 -05:00
Calen Pennington
805f32a357 Revert "Allow courses api to return data incrementally" 2019-01-25 12:56:57 -05:00
Calen Pennington
2527efd822 Prefetch CourseOverview.image_set when loading the course_api 2019-01-25 10:30:09 -05:00
Calen Pennington
0d273e9506 Prefetch course modes used in has_access calls in course api 2019-01-25 10:30:09 -05:00
Calen Pennington
a842921e1f Cache org-site lookups in the RequestCache 2019-01-25 10:30:09 -05:00
Calen Pennington
a3541d6e46 Allow courses api to return data incrementally
Prior to this commit, the course api (/api/courses/v1/courses/)
performed all the work necessary to return all courses available
to the user, and then only actually returned on page's worth of those
courses.

With this change, the api now does the work incrementally, computing
only the data needed to fetch the courses up to and including the page
being returned. This still increases approximately linearly as
the page number accessed being increases, but should be more cache-friendly.
One side effect of this is that the max_page reported by pagination
will be an overestimate (it will include pages that are removed due
to a users access restrictions).

This change also changes the sort-order of courses being returned by the
course_api. By sorting by course-id, rather than course-number, we
can sort in the database, rather than in Python, and defer loading data
from the end of the list until it is requested.

REVMI-90
2019-01-25 10:30:09 -05:00
Calen Pennington
ee75db2703 Add a test that shows how bad course api query counts are 2019-01-24 22:54:01 -05:00
Calen Pennington
77922ae073 Merge pull request #19478 from edx/hide-empty-content-course-blocks
REVE-181: Hide empty container blocks from the course blocks api when called by the mobile app
2018-12-21 10:22:59 -05:00
Calen Pennington
325fbe4eb2 Hide empty container blocks from the course blocks api when called by the mobile app
All code in this PR should be removed after REVE-52 is merged and mobile
traffic from older app versions falls to < 5% of the mobile traffic
to the course_blocks api
2018-12-20 15:17:24 -05:00
Bill Filler
684d6e3669 check if user is in holdback before showing new track selection 2018-12-17 16:05:13 -05:00
David Ormsbee
192ed213f6 Merge pull request #19284 from open-craft/symbolist/access-for-unenrolled-learners
Access for unenrolled learners.
2018-12-10 11:03:00 -05:00
Matthew Piatetsky
14a899a65d REVE-104 & REVE-108: Ensure Course Roles' Access 2018-12-07 16:39:09 -05:00
Paulo Viadanna
c4fc4b5df6 Adds CouseModule.course_visibility and XBlock.public_view() for unenrolled users access to courses.
The course_visiblity field can have one of three values:
1. private (default): This keeps the standard access rules.
2. public_outline: Allows unenrolled and anonymous users access to the outline.
3. public: Allows unenrolled and anonymous users access to both outline and
   course content.

When an unenrolled user accesses course content, instead of student_view(),
public_view() is used. A default implementation is provided for XBlocks
which do not implement this view. The public_view() must not have any
functionality which assumes the presence of a valid User and should show
a readonly only interface for the XBlock content.
2018-12-07 22:17:36 +05:00
Calen Pennington
0cb48dfe1c Add StackedConfigurationModels for managing content_type_gating and course_duration_limits 2018-11-21 12:18:10 -05:00
Awais Jibran
194c6bacb6 Revert "Merge pull request #18720 from open-craft/paulo/anonymous-views"
This reverts commit f9ae594dfe, reversing
changes made to 7c08e50fde.
2018-11-09 22:49:14 +05:00
Paulo Viadanna
e6e0a02e0a Adds CouseModule.course_visibility and XBlock.public_view() for unenrolled users access to courses.
The course_visiblity field can have one of three values:
1. private (default): This keeps the standard access rules.
2. public_outline: Allows unenrolled and anonymous users access to the outline.
3. public: Allows unenrolled and anonymous users access to both outline and
   course content.

When an unenrolled user accesses course content, instead of student_view(),
public_view() is used. A default implementation is provided for XBlocks
which do not implement this view. The public_view() must not have any
functionality which assumes the presence of a valid User and should show
a readonly only interface for the XBlock content.
2018-11-07 16:18:39 +05:00
Ned Batchelder
59d78031d8 Fix trailing-comma-tuple warnings 2018-11-02 11:06:59 -04:00
J Eskew
0e76d04819 Merge pull request #17682 from mitodl/fix_overrideing_due_date_issue
Fixed override due date by limiting scope to selected users
2018-10-12 17:37:32 -04:00
Jeremy Bowman
1a5bf35357 TE-2689 Remove useless pylint suppressions part 2 2018-08-14 17:39:02 -04:00
Jeremy Bowman
4e8668d3be TE-2524 Stop using nose.plugins - LMS 2 2018-08-01 13:54:06 -04:00
Amir Qayyum Khan
5ae5a531f4 Fixed override due date by limiting scope to selected users
Added selected user tests

updated my email
2018-07-19 14:25:34 +05:00
christopher lee
939c7f4857 Set max page size for get courses 2018-06-19 15:39:50 -04:00
christopher lee
48b5485be1 Set max page size for get courses
LEARNER-5566
2018-06-19 13:07:04 -04:00
Waheed Ahmed
780c1d982d Rate limit course list API.
This endpoint is likely being inefficient with how it's querying various parts
of the code and can take courseware down, it needs to be rate limited until
optimized.

LEARNER-5527
2018-06-13 16:59:32 +05:00