Commit Graph

753 Commits

Author SHA1 Message Date
Zaman Afzal
363a75cc99 ENT-2518 Fix Enterprise Login Page not showing to the user (#22602) 2020-01-01 15:18:45 +05:00
David Ormsbee
3f0281dd66 Fix test that assumes 2020 is in the future. 2019-12-31 17:25:02 -05:00
David Ormsbee
2cb2265ffe Add request caching to reduce ORM queries
This adds request caching to the following places:
* course expiration wrapper (displayed in Units)
* offer banner generation (displayed in Units)
* get_enrollment
* user_by_anonymous_id
* youtube_disabled_for_course

On a sample course with edx-val enabled, this reduced the queries
for a large sequence from 450 to 155.
2019-12-30 16:19:25 -05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -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
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Zaman Afzal
c07268d1b5 Fix the broken privacy page link url on enterprise login page (#22528) 2019-12-30 14:57:28 +05:00
Matthew Piatetsky
3a54df511a show discount in sidebar and sock 2019-12-17 09:09:19 -05:00
David Ormsbee
aaf4c46645 Add ENABLE_COURSEWARE_SEARCH_FOR_COURSE_STAFF flag
Add an LMS feature flag to enable courseware search for course staff
only. TNL-6931
2019-12-05 15:14:26 -05:00
Zia Fazal
b2de1b5214 Merge pull request #22448 from edx/revert-22413-revert-22345-ziafazal/ENT-1849-b
Revert "Revert "ENT-1849: Removed EnterpriseMiddleware""
2019-12-05 19:00:15 +05:00
DawoudSheraz
2470d9a0f5 fix logs condition 2019-12-05 11:08:38 +05:00
Zia Fazal
94166afa64 Revert "Revert "ENT-1849: Removed EnterpriseMiddleware"" 2019-12-02 11:28:59 +05:00
Zia Fazal
052035bcfd Revert "ENT-1849: Removed EnterpriseMiddleware" 2019-11-27 19:26:07 +05:00
DawoudSheraz
871f3bfb7e conditional logs to find the inconsistent block id in MITx course 2019-11-27 12:28:15 +05:00
Zia Fazal
ec1825c755 Merge pull request #22345 from edx/ziafazal/ENT-1849-b
ENT-1849: Removed EnterpriseMiddleware
2019-11-25 17:22:40 +05:00
Matthew Piatetsky
51ea129267 never give users discount unless they've seen the banner 2019-11-22 15:54:59 -05:00
Zia Fazal
e1cb10b41d Removed EnterpriseMiddleware
EnterpriseMiddleware set value of user's enterprise customer in session. In order to get value of enterprise customer it calls `enterprise/api/v1/enterprise-learner` API. Sometimes this middleware is called many times which result in many call to the under lying API and throttling of API causes 429 http errors.
We are not removing that middleware and storing value of user's enterprise customer in session inside underlying method.
ENT-1849

Removed pdb statement
2019-11-19 10:45:58 +05:00
Matthew Piatetsky
7bed9b4d1f stop bucketing into discount experiment a week before cyber monday 2019-11-15 11:03:31 -05:00
Manjinder Singh
d6bfa03993 Removing flaky tests (#22328)
These tests fail intermittently. The related jira ticket to remove flaky test can be found at: https://openedx.atlassian.net/browse/ENT-2479

The tests fail with error log output of: SafeCookieData BWC parse error: 'm3i1v99yuohzsbyjhfp4i9nktjrq4i05'
The error seems to be something to do with safe_cookie_string
2019-11-14 16:29:51 -05:00
Matthew Piatetsky
b0c9662b51 remove discount banner from track selection 2019-11-12 13:28:27 -05:00
Zia Fazal
5b6e0514de Added caller in to the exception message
Added caller in to the exception message to debug ENT-1849
Replaced `get_enterprise_learner_data` method call with `enterprise_customer_for_request` to get enterprise customer data from cache or session instead of hitting API.
2019-11-11 19:44:24 +05:00
hasnain-naveed
057f443a26 ENT-2437 | get_enterprise_customer_for_learner method replaced with enterprise_customer_for_request. 2019-11-08 15:47:52 +05:00
Stu Young
e229279f3c fix invalid choices in toggle annotations (#22266) 2019-11-07 15:22:46 -05:00
Matthew Piatetsky
bd76a71019 delete old holdback code 2019-11-07 09:51:39 -05:00
Manjinder Singh
79c9231128 Revert "ENT-2437 | get_enterprise_customer_for_learner method replaced with e…" (#22248) 2019-11-05 16:51:44 -05:00
Matthew Piatetsky
6eb5466ee5 Merge pull request #22198 from edx/REV-693
[REV-693] Create table to keep track of FBE holdback experiment enrollments
2019-11-04 14:40:26 -05:00
julianajlk
afae1f1d2a a11y: add role to FPD banner (#22225)
REV-705
2019-11-04 10:46:53 -05:00
Matthew Piatetsky
8d8626ca1f address comments 2019-11-01 13:41:01 -04:00
hasnain-naveed
4b827d5be0 ENT-2437 | get_enterprise_customer_for_learner method replaced with enterprise_customer_for_request. 2019-11-01 17:19:56 +05:00
Matthew Piatetsky
c2774083ea create table that excludes enrollments from FBE 2019-10-31 16:30:52 -04:00
julianajlk
a4ca026c19 add missing parameter to discount_percentage 2019-10-25 16:28:33 -04:00
Calen Pennington
47b8dfae75 Merge pull request #22156 from cpennington/expose-course-duration
Expose user course duration in the user metadata
2019-10-25 13:49:14 -04:00
Matthew Piatetsky
9df790cca5 Merge pull request #22123 from edx/REV-728
[REV-728] add discount percentage configuration
2019-10-25 10:10:20 -04:00
Calen Pennington
d92dcb28bb Expose user course duration in the user metadata 2019-10-25 10:02:55 -04:00
Awais Qureshi
82fb16b2f7 BOM-981,983,984
Fixing migrations.
2019-10-24 14:53:39 +05:00
Matthew Piatetsky
86bb0cfa2c add discount percentage configuration 2019-10-23 12:00:34 -04:00
julianajlk
6e0914ad5d add FPD banner to courseware (#22113)
REV-980
2019-10-23 09:33:11 -04:00
Zia Fazal
7ccd2a6901 Refactored enterprise unlink code to fix ENT-1890
Refactored enterprise unlink code to fix ENT-1890

Fixed quality violations and brokent test

Fixed pylint quality violations

Fixed failing unit test

Fixed broken test after rebasing with master
2019-10-23 11:35:58 +05:00
Braden MacDonald
5fc73468b3 Change completion API to work with any learning context 2019-10-22 14:04:31 -04:00
Feanil Patel
9946fd3918 Merge pull request #22099 from edx/revert-22058-julianajlk/REV-980/first-purchase-discount-courseware
Revert "add first purchase discount to courseware (#22058)"
2019-10-22 09:39:08 -04:00
Calen Pennington
b3421c8580 Merge pull request #22084 from cpennington/expose-access-denial-reasons
Expose access denial reasons inside verticals to the front-end on the…
2019-10-21 15:44:37 -04:00
julianajlk
98f907f23c Revert "add first purchase discount to courseware (#22058)"
This reverts commit 059b619794.
2019-10-21 13:57:18 -04:00
julianajlk
059b619794 add first purchase discount to courseware (#22058)
REV-980.
* moved get_first_purchase_offer_banner_fragment to Discounts utils.py
* added banner wrapper method
* updated banner with time limit
2019-10-21 13:56:38 -04:00
Calen Pennington
4e6e283495 Expose access denial reasons inside verticals to the front-end on the course outline 2019-10-21 12:41:36 -04:00
Muhammad Ammar
19fd375dc9 Merge pull request #22012 from edx/ammar/ent-1964-allow-user-to-edit-fullname-if-no-social-auth-record
allow user to edit fullname if no social auth record exists
2019-10-21 11:35:26 +05:00
Matthew Piatetsky
ec8f9f8f86 disable discount when upgrade deadline has passed 2019-10-18 16:15:14 -04:00
muhammad-ammar
fc2915b02f allow user to edit fullname if no social auth record
ENT-1964
2019-10-18 15:30:51 +05:00
Emma Green
bb14195685 Merge pull request #22067 from edx/move-anon-user-check-earlier
move the anonymous check earlier so that it cannot error out when it …
2019-10-17 13:35:23 -04:00