Commit Graph

6089 Commits

Author SHA1 Message Date
Awais Jibran
cfd78455df fix: update discussion API permissions (#29127) 2021-10-27 21:05:34 +05:00
Mubbshar Anwar
905c0a1eb9 fix: cta pop up (#29125)
do not show cta pop up when opt in checkbox show on register page.

VAN-740
2021-10-27 20:34:45 +05:00
David Ormsbee
5d0132305d Revert "feat: Adds discussions settings for new discusions experience (#28749)"
This reverts commit bb0c03123c.
2021-10-27 10:40:12 -04:00
Kshitij Sobti
bb0c03123c feat: Adds discussions settings for new discusions experience (#28749)
This commit adds new discussions settings for the new discussions experience. These are stored in the course so they can be a part of course import/export flow.
These are also added to the discussions configuraiton API to allow MFEs to update the settings.
The discussions API is currently available via LMS, however that means it cannot save changes to the modulestore. This also adds the API to the studio config so it can now also be accessed from studio and be used to save course settings.
2021-10-27 15:41:27 +05:00
M. Zulqarnain
39b91154fb feat: New codemods on OpenedX 1 (#28776) 2021-10-27 13:07:36 +05:00
Braden MacDonald
6c85668099 feat: write split modulestore's course indexes to Django/MySQL
Split modulestore persists data in three MongoDB "collections": course_index (list of courses and the current version of each), structure (outline of the courses, and some XBlock fields), and definition (other XBlock fields). While "structure" and "definition" data can get very large, which is one of the reasons MongoDB was chosen for modulestore, the course index data is very small.

This commit starts writing course indexes (active_versions) to both MySQL and Mongo, but continues to read from MongoDB only.

By moving course index data to MySQL / a django model, we get these advantages:
* Full history of changes to the course index data is now preserved
* Includes a django admin view to inspect the list of courses and libraries
* It's much easier to "reset" a corrupted course to a known working state, by using the simple-history revert tools from the django admin.
* The remaining MongoDB collections (structure and definition) are essentially just used as key-value stores of large JSON data structures. This paves the way for future changes that allow migrating courses one at a time from MongoDB to S3, and thus eliminating any use of MongoDB by split modulestore, simplifying the stack.
2021-10-26 10:06:52 -07:00
Awais Jibran
f1957a7cf7 fix: lms discussion tab url should be accurate (#29110)
* fix: lms discussion tab url should be accurate

* refactor: change supports_lti feature

* refactor: rename variable

* refactor: rename feature variable.

* fix: update supports_lti method

* test: fix failing tests.

* test: fix quality test failure

Co-authored-by: SaadYousaf <saadyousaf@A006-00314.local>
2021-10-26 19:57:41 +05:00
Kshitij Sobti
d4cd3bd611 fix: enabling the notes tool using the course authoring will now add the notes tab (#29093)
If an existing course doesn't already have the notes tab, enabling notes will not make it show up. This change fixes this by adding the tab in case it isn't already in the course.
2021-10-26 14:57:19 +05:00
Adeel Ehsan
873ca35dd9 Merge pull request #28844 from edx/aehsan/VAN-702/username_suggestions_format_updated
Username suggestion added based on the full name
2021-10-26 12:20:24 +05:00
Dillon Dumesnil
4917c8dc8b Merge pull request #29073 from edx/ddumesnil/update-edx-when-version-aa-1058
chore: AA-1058: Update edx-when version
2021-10-25 06:06:33 -07:00
Awais Jibran
fd6802746c fix: update course app cache per course (#29083) 2021-10-25 17:13:08 +05:00
Dillon Dumesnil
78fbd28f41 chore: AA-1058: Update edx-when version
Updates query counts for the additional query to look up the Schedule
in edx-when
2021-10-22 09:36:04 -04:00
Attiya Ishaque
38961e7798 fix: [VAN-747] Improvemessage for emails already registered. (#29088) 2021-10-22 18:16:34 +05:00
Awais Jibran
ed74db1daf Revert "feat: Add support for returning thread counts for all topics in a course [BD-38] [TNL-8724] [BB-4927] (#29062)" (#29087)
This reverts commit a2f04fb78b.
2021-10-22 17:21:44 +05:00
M. Zulqarnain
43008723be feat: New codemods on OpenedX 3 (#28778) 2021-10-22 13:55:51 +05:00
M. Zulqarnain
9833134fae Post Django 3.2 Cleanup (#29069)
* chore: Post Django 3.2 Cleanup
2021-10-22 13:55:16 +05:00
Zainab Amir
6019971dd4 feat: put year of birth behind feature flag (#29007) 2021-10-22 12:17:06 +05:00
adeelehsan
590ba28913 Username suggestion added based on the full name
VAN-702
2021-10-22 11:56:39 +05:00
Attiya Ishaque
7e3985291d feat: [VAN-751] Put user's year of birth behind the feature flag (#29025) 2021-10-22 11:33:01 +05:00
Kshitij Sobti
a2f04fb78b feat: Add support for returning thread counts for all topics in a course [BD-38] [TNL-8724] [BB-4927] (#29062)
* feat: Add support for returning thread counts for all topics in a course

In the new discussions experience the thread counts for questions and discussions are displayed in the UI.
This uses a new cs_comments_service API to fetch that data and embed it in the topic listing.

* fix: apply review feedback fixes
2021-10-22 11:22:05 +05:00
Michael Terry
6e2277f522 Merge pull request #28868 from edx/mikix/double-coupon
fix: drop segment call for streak discount
2021-10-21 12:51:22 -04:00
Kshitij Sobti
2ecb4daece fix: update course URL match pattern to also match learning MFE (#29050)
The learning MFE paths include /course/{course_id} which doesn't match /courses/{course_id} which is what the regex expects. This causes issues with the Wiki when when accessed from the learning MFE doesn't detect that course it's related to in the middleware.
2021-10-21 20:24:40 +05:00
Usama Sadiq
95427251dc fix: fixed pylint warnings 2021-10-21 09:54:22 -04:00
Kyle McCormick
9bf266f717 fix: add missing __init__.py files 2021-10-21 09:54:22 -04:00
Manjinder Singh
ef135fba5a feat: only redirect to login for top-level page navigation requests (#29054)
Commit modifies safe session middleware to return an 401 in case of authentication failure and lack of 'text/html' in Accept header.

Previously, the middleware would always redirect to login in case of auth failure, but this was deemed inappropriate for any requests that are not top-level page navigation requests(we check this by seeming if 'text/html' is precent in Accept header)

Co-authored-by: Robert Raposa <rraposa@edx.org>
2021-10-21 08:45:52 -04:00
Usama Sadiq
9ee8df0980 fix: Remove pylint constraint and fix warnings (#28646) 2021-10-20 23:00:13 +05:00
SaadYousaf
22d106daf4 refactor: refactoring feature list for providers 2021-10-20 11:54:44 +05:00
Robert Raposa
ab9fedf874 fix: mark access token login user change
Since we may get a user change during access token
login, we mark it as expected so our Safe Session
protection won't be triggered.
2021-10-18 12:17:20 -04:00
Robert Raposa
b92bc527a8 fix: mark register user change
Since we may get user changes during registration,
we mark it as expected so our Safe Session protection
won't be triggered.
2021-10-18 12:05:28 -04:00
Feanil Patel
2cd130a2d2 Merge pull request #29039 from edx/feanil/set_code_owner
fix: Decorate celery task to set code owner attribute.
2021-10-15 14:29:19 -04:00
Rebecca Graber
835666a0bf fix: do not log error for sessions where user is changed to None (#29036) 2021-10-15 13:55:26 -04:00
Feanil Patel
bc00e64409 fix: Decorate celery task to set code owner attribute.
See https://edx.readthedocs.io/projects/edx-django-utils/en/latest/monitoring/how_tos/add_code_owner_custom_attribute_to_an_ida.html\#handling-celery-tasks fo more details.
2021-10-15 13:55:12 -04:00
Rebecca Graber
2200b5382e feat: only log requests that fail user verification in SafeSessionMiddleware (#29028)
* feat: only log requests that fail user verification in SafeSessionMiddleware
ARCHBOM-1923
2021-10-15 10:52:13 -04:00
Feanil Patel
f9a28d1654 fix: Mark user change as expected in LTIToolLaunchView.post
The lti user gets authenticated and logged in as a part of the LTI View
Post.  This results in the request user changing during the request.  We
mark it here so that it does not produce a false alarm in our
SafeSessions middleware.
2021-10-15 10:10:39 -04:00
Felipe Montoya
678c159cf8 docs: adding the first version of documentation for open edx events
Includes:
- general documentation
- links to individual events definitions and location
- adding examples to events docs
- adding annotations at the trigger location
2021-10-13 15:28:24 -05:00
Tim McCormack
fe3d855986 feat: Don't warn about expected user changes in safe-sessions (#28983)
This is intended to silence a rare false positive that seems to happen
when someone logs in on a browser that already has an active session
for another user. We believe there should be no further positives once
this case is handled.

- login and logout views annotate the response to indicate the session
  user should be changing between the request and response phases
- safe-sessions middleware skips the verify-user check when this
  annotation is present

Also:

- Adds a test around existing behavior for unexpected user-changes
- Remove logging control based on `is_from_log_out`. This reverts most
  of af9e26f/PR #11479 for two reasons:
  - The safe-sessions `_verify_user` code has since changed to check for
    `request.user.id == None`
  - A commit later in the PR changes the login and logout pages to
    signal that the user/session change is expected
2021-10-13 15:53:16 +00:00
Shafqat Farhan
feb732d859 fix: VAN-739 - removed is_active property from Segment 2021-10-11 19:23:14 +05:00
SaadYousaf
91fcad813d fix: update discussion features with support level added to API response 2021-10-11 17:40:44 +05:00
Manjinder Singh
9ef8332a60 Revert "feat: adding code owner for a Celery event"
This reverts commit 2c37fec345.
2021-10-08 17:30:16 -04:00
Manjinder Singh
2c37fec345 feat: adding code owner for a Celery event 2021-10-08 17:29:06 -04:00
Michael Terry
8253d41ccf fix: drop segment call for streak discount
It's being moved to the frontend, to better control when it's
emitted (we want to only emit it if the voucher has not yet been
claimed, which the frontend will ask ecommerce about).

AA-1012
2021-10-08 13:51:34 -04:00
Mubbshar Anwar
23c94b7ec5 fix: add opt in/out event (#28985)
add opt in/out event for Braze.

VAN-738
2021-10-08 22:39:54 +05:00
Mubbshar Anwar
66291c3aa6 feat: record opt in/out attribute (#28883)
* feat: record opt in/out attribute

save opt in/out attribute comming from frontend-app-authn register page.
VAN-738

* feat: VAN-738 - Send marketing event property and email subscription

* feat: VAN-738 - Send marketing event property and email subscription

* feat: VAN-738 - updated conditions

* feat: VAN-738 - added is_active for braze during registration

* feat: VAN-738 - added is_active for braze during registration

* feat: VAN-738 - fixed pep8 violation

Co-authored-by: Shafqat Farhan <shafqat.farhan@arbisoft.com>
2021-10-08 18:29:18 +05:00
David Ormsbee
ae124bd554 Revert "feat: store split modulestore's course indexes in Django/MySQL"
This reverts commit 96e5ff8dce.
2021-10-07 15:07:42 -04:00
Braden MacDonald
96e5ff8dce feat: store split modulestore's course indexes in Django/MySQL
Split modulestore persists data in three MongoDB "collections": course_index (list of courses and the current version of each), structure (outline of the courses, and some XBlock fields), and definition (other XBlock fields). While "structure" and "definition" data can get very large, which is one of the reasons MongoDB was chosen for modulestore, the course index data is very small.

By moving course index data to MySQL / a django model, we get these advantages:
* Full history of changes to the course index data is now preserved
* Includes a django admin view to inspect the list of courses and libraries
* It's much easier to "reset" a corrupted course to a known working state, by using the simple-history revert tools from the django admin.
* The remaining MongoDB collections (structure and definition) are essentially just used as key-value stores of large JSON data structures. This paves the way for future changes that allow migrating courses one at a time from MongoDB to S3, and thus eliminating any use of MongoDB by split modulestore, simplifying the stack.
2021-10-07 10:59:47 -04:00
Muhammad Soban Javed
fc14dba632 Merge pull request #28968 from edx/iamsobanjaved/django32-user-api-bool-fix
refactor: use value for filtering indexed boolean field
2021-10-07 17:53:06 +05:00
Jawayria
7d50ce104a refactor: use value to filter indexed boolean field (#28970)
* refactor: use value to filter indexed boolean field

* Update views.py

Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
2021-10-07 17:52:45 +05:00
Soban Javed
a830b08f05 refactor: use value for filtering indexed boolean field 2021-10-07 16:06:58 +05:00
Kshitij Sobti
3e05e0f49b feat: add support for enabling/disabling the wiki app (#28889)
Currently the wiki app can't be enabled or configured. This change allows enabling/disabling the wiki app which effectively hides/shows the wiki tab.
2021-10-07 11:04:03 +05:00
Matthew Piatetsky
449d5c7a2d feat: only email users about their goal in the morning in their timezone (#28922) 2021-10-06 15:02:03 -04:00