Commit Graph

228 Commits

Author SHA1 Message Date
Leangseu Kim
ae6914fe3d chore: add ora mfe url env 2023-11-27 16:36:23 -05:00
Andy Shultz
3da6578e9b feat: add settings for detailed search logging (default off)
devstack on, production load from environment
2023-11-16 10:00:30 -05:00
Rodrigo Martin
e51c01bf4e feat: add support for user feedback on autogenerated transcripts (#33518)
* feat: WIP transcript feedback

* feat: Add UI mock for Transcript Feedbacks (#33416)

* feat: Add UI mock for Transcript Feedbacks

* fix: Fix mongo tests

* feat: Get video_uuid, user_uuid and language for request (#33445)

* feat: make call to ai-translations to obtain feedback

* feat: Show widget if transcript was AI generated

* feat: bind all class methods

* fix: async calls

* feat: send request when choosing feedback

* feat: update showing condition (#33474)

* fix: ajax success lint

* fix: video caption specs errors fixed

* feat: add coverage to feedback widget

* chore: connect XT to LMS and CMS

* feat: use url

* chore: add vars to devstack

* chore: fix url name

* feat: update unit tests regarding env vars

* fix: fix test_video_mongo

* feat: add more tests

* feat: remove console log

Co-authored-by: Jesper Hodge <19345795+jesperhodge@users.noreply.github.com>

* fix: rename shouldShowWidget to loadAndSetVisibility

---------

Co-authored-by: María Guillermina Véscovo <mvescovo@2u.com>
Co-authored-by: Jesper Hodge <19345795+jesperhodge@users.noreply.github.com>
2023-11-06 16:33:53 +00:00
Rebecca Graber
ddabba458b feat: remove manual sends of events (#33642) 2023-11-03 10:36:50 -04:00
Muhammad Abdullah Waheed
caf8e456e2 Revert "feat: Account and profile MFE legacy removal - redeployment (#31893)" (#33542)
This reverts commit 08f5e7e563.
2023-10-19 12:26:29 +05:00
Muhammad Abdullah Waheed
08f5e7e563 feat: Account and profile MFE legacy removal - redeployment (#31893)
feat: Account and profile MFE legacy removal - redeployment

* Revert "Revert "FC-0001: Account pages -> micro-frontend (#30336)" (#31888)"

This reverts commit 90c4ca6e47.

* refactor: removed filters test from user_api accounts

---------

Co-authored-by: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com>
2023-10-19 10:43:15 +05:00
German
d3a6615deb chore: update location config for devstack-experimental (#33256)
* Update location in devstack-experimental to fix issue while re-indexing
* Updated the devstack.py to point to edx.devstack.elasticsearch710 host
* Enabed the ENABLE_COURSEWARE_INDEX and ENABLE_COURSEWARE_SEARCH
2023-09-14 14:21:47 -03:00
Nawfal Ahmed
8cd0cb0d07 feat: get subscription upsell values from env (#32770) 2023-07-18 17:43:39 +05:00
Braden MacDonald
7a89f2e5d3 fix: remove deprecated django-debug-toolbar Logging Panel (#32553) 2023-07-10 11:16:16 -07:00
Nawfal Ahmed
80d151b404 feat: add marketing url to subscription upsell (#32560) 2023-06-23 12:54:15 +00:00
Zachary Hancock
41c27e8cbd Add exams dashboard MFE to instructor dash (#32493)
* feat: use new exams mfe for lti enabled courses
2023-06-20 10:21:43 -04:00
Ned Batchelder
8e7b0c1c73 fix: oscm@edx.org is not the right email for asking about APIs
We get about one email per month from people looking for access to edX
APIs.  Those emails come to the now almost-defunct oscm@edx.org email
address.  I think that's because of these swagger references.

I suppose someone could find this email address on an Open edX
installation, and people would write to it, but I find in practice this
doesn't happen.

Co-authored-by: Kyle McCormick <kyle@tcril.org>
2023-05-22 07:51:45 -07:00
Mohammad Ahtasham ul Hassan
acc9dac627 fix: fix manage subs url, add orders and subs url (#32126)
* fix: fix manage subs url, add orders and subs url
2023-05-16 09:35:22 +05:00
Navin Karkera
ab83771295 feat: update event_bus_kafka and add event_bus_redis (#32117) 2023-05-15 13:35:23 +00:00
Tim McCormack
06969e6c50 feat: Add a script to enhance JWKs in preparation for move from pyjwkest (#32089)
* feat: Add a script to enhance JWKs in preparation for move from pyjwkest

This script accepts a signing JWK (presumably `JWT_PRIVATE_SIGNING_JWK`)
and ensures that it has all of the precomputed private numbers that are
required for top performance. This is necessary before moving away from
pyjwkest to PyJWT for signing JWTs. See issue
<https://github.com/openedx/edx-drf-extensions/issues/290>. (Alternatively,
one could remove the p, q, dp, dq, and qi params, but there is an unknown
performance cost to doing so as we are not currently caching these keys,
and the precompution happens on every load due to the way pyjwkest's API
works.)

* fixup! Upgrade devstack at the same time
2023-04-20 09:08:14 -04:00
Mohammad Ahtasham ul Hassan
2a7b400770 fix: fix buy_subscription_url to use get method (#32079)
* fix: fix buy_subscription_url to use get method
2023-04-18 15:31:32 +05:00
Mohammad Ahtasham ul Hassan
e973266b2f feat: fetch program subscription details (#32023)
* feat: fetch program subscription details
2023-04-14 16:33:12 +05:00
Muhammad Abdullah Waheed
90c4ca6e47 Revert "FC-0001: Account pages -> micro-frontend (#30336)" (#31888)
This reverts commit 0f02c7b3d9.
2023-03-07 17:41:56 -05:00
Sagirov Evgeniy
0f02c7b3d9 FC-0001: Account pages -> micro-frontend (#30336)
* feat: Account pages. Learner Profile page

* feat: Account pages. Account Settings page

* feat: Account pages. Removed unused styles

* feat: Account pages. Removed unused toggles

* feat: fixed tests and pylint errors

* feat: update redirect to account settings for student_dashboard

* feat: fix pylint errors
2023-03-07 17:41:52 +05:00
Navin Karkera
5ed5cc5bc1 feat: put sending xblock events over bus behind feature flag (#31813) 2023-02-22 11:03:24 -05:00
Zachary Hancock
9522cbdc8b feat: gate exam content using access token (#31653)
Gate access to exam content by requiring an access token. This is a signed JWT issued by the edx-exams service that grants a user access to a sequence locator for a short lived window while an exam is in progress. This feature only applies to courses using the new exam service instead of edx-proctoring.
2023-02-17 10:00:52 -05:00
Justin Hynes
213ade8cf7 fix: remove unused settings from edx-paltform related to learner record MFE
[APER-2240]

The monolith no longer needs to understand how to build URLs to the Learner Record MFE. The Credentials IDA has logic to determine if (and how) a request should be redirected to this MFE. This PR remove unused settings from edx-platform.

We have already removed the use of these settings in #31672.
2023-01-31 09:44:30 -05:00
Jeff Cohen
f03b141f05 fix: do not clear request cache when running eager Celery tasks (#31261)
Clearing the RequestCache was intended to address memory leaks in the
celery workers. Celery worker processes will process many tasks before
they are terminated. RequestCache cleanup typically happens in the
RequestCacheMiddleware class, and middleware never executes for celery.
To get around that issue, the CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION
setting was created to clear the RequestCache after every task was
successfully completed.

This works fine when celery is running as a separate process, as it's
set up to do in production. But during development, the
CELERY_ALWAYS_EAGER setting variable is set to True, meaning that
celery tasks are run in the same thread as the Django Request. This is
meant to make debugging easier, as task failures run as part of the
request cycle and will raise exceptions that are visible to the
browser.

However, celery tasks are triggered from many different actions. That
means that the RequestCache was being cleared many times during the
course of processing a request. This led to behavior that was
potentially slower, but also incorrect–the RequestCache was getting
flushed in a way that wouldn't happen in any deployed environment
because celery would be running in separate processes there. This came
up when trying to fix an issue around extra history records being
created during problem submissions:

  https://discuss.openedx.org/t/extra-history-record-stored-on-each-problem-submission/8081

Furthermore, it's not necessary to prevent RequestCache memory leaks
when running in CELERY_AWLAYS_EAGER mode in development because the
middleware cleanup happens automatically–as everything is running as
part of the request/response cycle.

There are times in which we may want to run celery eagerly and still
clear the cache, such as testing. I have set
CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION = False in all dev and test
environments that already have CELERY_ALWAYS_EAGER = True. The unit
test that specifically tests whether the request cache is getting
cleared upon completion of a celery task then overrides
CLEAR_REQUEST_CACHE_ON_TASK_COMPLETION = True even though
CELERY_ALWAYS_EAGER = True for the sake of that specific testing
purpose.
2022-11-07 11:48:39 -05:00
Zachary Hancock
2f3c93ed9f feat: sync with exam service on course publish (#31015)
Call into the exam service instead of the edx-proctoring plugin on course publish if the course_apps.exams_ida course waffle flag is enabled. This is an early step in moving away from edx-proctoring
2022-09-20 12:38:32 -04:00
Sarina Canelake
4a2f231302 fix: fix github url strings (org edx -> openedx) 2022-09-15 14:52:28 -04:00
Justin Hynes
9e83bf8f94 feat: Add configuration option to route View Records button to the Learner Record MFE
[APER-1922]

We are converting the legacy UI of the `records` app in the Credentials IDA (credentials.edx.org/records/, credentials.edx.org/records/programs/{uuid}, etc.) to a new MFE. Today, the Program Dashboard and the legacy (non-MFE) profile page have buttons that route learners to the Credentials IDA pages. We need to (optionally) introduce a way to route learner's to the new MFE instead.

- Introduces a new configuration setting called `LEARNER_RECORD_MICROFRONTEND_URL` (defaulting to None). This will be used by the LMS to store the base URL of the new MFE (e.g. records.stage.edx.org).
- Introduces a new waffle switch named `USE_LEARNER_RECORD_MFE`. This will be used to control whether routing learner's to the new MFE is enabled from the LMS's side.
- Updates the existing `get_credentials_records_url` function to add additional logic that will determine if we need to build a link to the legacy FE or the new MFE
- Adds tests for new and existing behavior. There were no existing unit tests for the utility function that I updated.
2022-09-07 13:44:05 -04:00
Ben Warzeski
a60b34bb7b fix: update learner home api (#30893)
* fix: update learner home api

* refactor: update learner home API pathing

* fix: remove unused logger

* fix: remove unused import

* style: make pylint happy

* style: remove extra space

* style: remove extra space

Co-authored-by: nsprenkle <nsprenkle@2u.com>
Co-authored-by: Nathan Sprenkle <nsprenkle@users.noreply.github.com>
2022-08-24 12:34:14 -04:00
Muhammad Bilal Tahir
10509bc27b chore: added whitelist urls in devstack as reesult of ENT-6109 2022-08-19 01:02:19 +05:00
Mohammad Ahtasham ul Hassan
8ef261fe07 Remove Old Pymongo pin (#30569)
* chore: unpin pymongo
2022-06-27 14:37:29 +05:00
Nathan Sprenkle
541515cbd0 feat: add ora grading/gradebook urls for devstck (#30616)
Co-authored-by: nsprenkle <nsprenkle@2u.com>
2022-06-17 14:10:53 -04:00
Eugene Dyudyunov
f262d64ad4 FC-0001: enterprise dependencies for EdxRestAPIClient replacement (#30240)
* refactor: enterprise dependencies for EdxRestAPIClient replacement

This is a part of https://github.com/openedx/public-engineering/issues/42

- add settings for enterprise-backend-service DOT application
- update utils used by enterprise to get rid of EdxRestAPIClient
- original utils stays in the code (to keep edx-platform api
clients working) till the
https://github.com/openedx/public-engineering/issues/39 deprecation
work will be done

* fix: fix typo in the docstring
2022-04-21 15:28:22 -04:00
Jillian Vogel
98a26e8674 fix: use default MEDIA_URL in devstack
The devstack override for this variable didn't work, so just use the common default: /edx/var/edxapp/media
2022-04-21 09:35:08 +01:00
Tim McCormack
a251d18281 feat!: Use more-trusted IP in rate-limiting (#241)
Previously, our rate-limiting code trusted the entire `X-Forwarded-For`
header, allowing a malicious client to spoof that header and evade
rate-limiting. This commit introduces a new module and setting
allowing us to make a more conservative choice of IPs.

- Create new `openedx.core.djangoapps.util.ip` module for producing
  the IP "external chain" for requests based on the XFF header and the
  REMOTE_ADDR.
- Include a function that gives the safest choice of IPs.
- Add new setting `CLOSEST_CLIENT_IP_FROM_HEADERS` for configuring how
  the external chain is derived (i.e. setting the trust
  boundary). Currently has a default, but we may want to make it
  mandatory in the future.
- Change `django-ratelimit` code to use the proximate IP in the external
  chain -- the one just outside the trust boundary.

Also:

- Change `XForwardedForMiddleware` to use more conservative choice for
  its `REMOTE_ADDR` override
- Other adjustments to `XForwardedForMiddleware` as needed in order to
  initialize new module and support code that needs the real
  `REMOTE_ADDR` value
- Metrics for observability into the change (and XFF composition)
- Feature switch to restore legacy mode if needed

This also gives us a path forward to removing use of the django-ipware
package, which is no longer maintained and has a handful of bugs that make it
difficult to use safely.

Internal ticket: ARCHBOM-2056
2022-04-20 13:46:58 +00:00
Thomas Tracy
700829bd4b feat: [Microba-1758] link new bulk email tool (#30099)
Creates a link to the new communication mfe's bulk email tool in the
instructor dashboard version. Staff can now use either experience. In
the future, we plan on turning off the old experience, like analytics.
2022-03-22 13:47:08 -04:00
Awais Ansari
5a4cbc56ae feat: link discussions feedback URL with feedback button (#29919)
* feat: link discussions feedback URL with feedback button
2022-02-15 17:28:03 +05:00
Nathan Sprenkle
1212e3550c feat: ora staff grader backend (#29828)
- Adds Enhanced Staff Grader (ESG) backend-for-frontend (BFF) in `lms/djangoapps/ora_staff_grader`
    - Adds routing to ESG BFF at `{lms_url}/api/ora_staff_grader/*`
    - Adds mock implementation routing at `{lms_url}/api/ora_staff_grader/mock/*`
    - Adds `ORA_GRADING_MICROFRONTEND_URL` setting for routing to ESG microfrontend (MFE)
- Updates to the teams app:
    - Add`get_teams_in_teamset` to the teams API.
    - Add `get_team_names` to teams service.
- Adds `openassessment.staffgrader` app for appropriate ORA migrations.
- Modifies management commands for creation of users.
- Updates test factory to return display org with course overview.

Co-authored-by: jansenk <jkantor@edx.org>
Co-authored-by: Leangseu Kim <lkim@edx.org>
Co-authored-by: Ben Warzeski <bwarzeski@edx.org>
2022-01-31 11:09:41 -05:00
Kshitij Sobti
c8bd924e23 feat: Add support for using the discussions MFE UI instead of existing UI [BD-38] [TNL-9228] (#29285)
* feat: Add support for using the discussions MFE UI instead of existing UI

Adds a new course waffle flag that when set along with the discussions MFE URL shows the discussions MFE UI instead of the regular UI.

* test: add tests

* squash!: more consistent url name
2021-11-23 14:56:25 +05:00
Ned Batchelder
d9dd10dc97 style: code cleanups from Steven Burch (#29292)
* chore: update deprecated import from collections

* chore: remove outdated imports from markdown library

as it hasn't been supported since 2.0.3 and we're on 3.x.
This was deprecated at least as early as 2012!

* docs: add docstring and remove lint-amnesty to markdown plugin

* chore: remove deprecated etree import

* style: remove unnecessary-comprehension for sets

* style: resolve a number of amnestied pylint complaints

Co-authored-by: stvn <stvn@mit.edu>
2021-11-10 07:11:57 -08:00
Justin Hynes
e50085401e feat: filter bulk course email recipients based on last_login date
[MICROBA-1569]
- filter bulk course email recipients based on the last_login date of a learner's user account
- introduces a new setting named `BULK_COURSE_EMAIL_LAST_LOGIN_ELIGIBILITY_PERIOD` that sets the login threshold to be included (in months) to a bulk course email message(if set)
2021-11-08 09:14:50 -05:00
Tim McCormack
90b48d68b6 feat: Activate Studio SSO for devstack (#28534)
This also requires using different session cookie names in devstack for
LMS and Studio so that we can properly use the OAuth flow locally, rather
than just sharing a session cookie on the localhost domain. (Note that
ports are not used for cookie segmentation in browsers.)

This depends on the following provisioning PR:
https://github.com/edx/devstack/pull/825
2021-08-25 20:37:05 +00:00
Simon Chen
d56018a587 fix: Add the devstack domain white list to the account MFE (#28497)
Co-authored-by: Simon Chen <schen@edx-c02fw0guml85.lan>
2021-08-19 10:25:59 -04:00
Hamza Farooq
4a2549f49a fix: making LOGIN_REDIRECT_WHITELIST configurable through env files (#26760)
LOGIN_REDIRECT_WHITELIST has been used to filter redirect-url while processing logout requests but its configurations were not picked through environment files like lms.yml or studio.yml. This PR fixes that bug.
2021-08-03 08:29:23 -04:00
Sofia Yoon
60493757e6 fix: webpack loader config to display error 2021-07-15 17:06:01 -04:00
M. Zulqarnain
40a987d9d0 refactor: pyupgrade on LMS (#26851) 2021-03-22 17:51:23 +05:00
Kyle McCormick
bcb48525ac refactor: clean up unused ERROR_ON_DEPRECATED_EDX_PLATFORM_IMPORTS (#26900)
The setting overrides should've been cleaned up in a previous
commit, but I missed them. This change is a no-op.
2021-03-08 15:01:12 -05:00
Kyle McCormick
e792242b5f refactor!: remove redundant ENABLE_COURSEWARE_MICROFRONTEND toggle (#26792)
The Django setting
FEATURES['ENABLE_COURSEWARE_MICROFRONTEND']
has been an additional gate to activating
usage of the Learning MFE for an Open edX
instance.

The toggle is redundant with the
`courseware.courseware_mfe`
Waffle flag. By removing it, we simplify our config
and simplify our path towards making the Learning MFE
the default courseware experience.

TNL-7796
2021-03-02 11:36:43 -05:00
Christie Rice
f844681913 Revert "BOM-2368: pyupgrade in LMS Directory (#26649)"
This reverts commit fc06846cb0.
2021-02-23 15:29:49 -05:00
M. Zulqarnain
fc06846cb0 BOM-2368: pyupgrade in LMS Directory (#26649)
* pyupgrade in lms dir

* replace wildcard

* pep8 fix

* fix quality
2021-02-23 12:36:00 +05:00
Tim McCormack
b8a6e30bd9 fix: Add new proctoring key to Studio devstack & tests envs (copy from LMS) (#26430)
Turns out it's needed for the Proctoring Settings view.

Also reorder slightly for better clustering.

MST-644
2021-02-08 15:43:51 +00:00
Tim McCormack
38f29c30f8 feat: Use edx-proctoring 3.0.0 and set required ID generation key (#26408)
MST-637: edx-proctoring 3.0.0 now requires a new key for use in ID
generation, starting from same value as SECRET_KEY (pre-rotation, but
rotation never happened for devstack.)

Remote config changes already made for relevant environments.
2021-02-05 16:19:14 +00:00