Commit Graph

61329 Commits

Author SHA1 Message Date
Ned Batchelder
3333f78cf7 fix(process_warnings): escape html text so that <class ..> doesn't disappear 2022-04-28 01:32:36 -07:00
Alex Dusenbery
fb9c808939 fix: edx-enterprise-3.46.0 | fix redirect_if_blocked signature
https://github.com/openedx/edx-enterprise/pull/1544
Make the signature in edx-enterprise match and use the same signature that
openedx.core.djangoapps.embargo.redirect_if_blocked() now uses.
2022-04-27 15:37:12 -04:00
ansabgillani
55df11b489 fix: remove sso history model 2022-04-27 23:52:22 +05:00
SaadYousaf
98262c088d feat: send email to moderators after content is reported 2022-04-27 22:18:56 +05:00
ansabgillani
8c7059c5bb fix: reverting SSO History changes to unblock stage 2022-04-27 21:09:44 +05:00
Mubbshar Anwar
ae697b1f46 fix: data integrity error (#30313)
while updating SavedCourse or SavedProgram objects data integrity exception was raising
VAN-938
2022-04-27 17:05:43 +05:00
Usama Sadiq
9211f3a67a BOM-3365: Remove python-slugify constraint & python transifex client (#30312)
* fix: remove python slugify constraint
* fix: remove python transifex-client package
2022-04-27 12:58:15 +05:00
ansabgillani
4af3d58b39 feat: Add SSO History for Support 2022-04-27 11:44:25 +05:00
edX requirements bot
4119e60fa9 chore: Updating Python Requirements (#30315) 2022-04-26 12:44:42 +05:00
Mubbshar Anwar
0ed58f32e7 feat: email linking for SSO (#30258)
Make email linking for SSO as default behavior.
VAN-331
2022-04-26 12:13:43 +05:00
Michael Terry
393fd971f5 Merge pull request #30295 from openedx/mikix/embargo-chain
fix: use safer ip-chain logic when checking ip for embargos
2022-04-25 11:41:12 -04:00
Feanil Patel
f2ec7b5053 chore: Cleanup last remenants of the edx-microsite code. (#30306)
There are still references to the word `microsite` because the
site-configuration code uses it to referr to it's sub-sites in a few
places.
2022-04-25 10:48:35 -04:00
jfavellar90
aefdda9df3 perf: Relax load in instructor dashboard page
Relax load when bringing all the course children when fetching a course in the instructor dashboard page.

When loading the Instructor dashboard, the course is fetched with
3cbc5b9cdc/lms/djangoapps/instructor/views/instructor_dashboard.py (L122)

 Please note that the parameter **depth** is zero, so the course is fetched with no children (sections, subsections, sequentials, etc). In a subsequent part of the code, the extensions tab is loaded, specifically in :

3cbc5b9cdc/lms/djangoapps/instructor/views/instructor_dashboard.py (L585)

Which eventually call the method **get_units_with_due_date**

3cbc5b9cdc/lms/djangoapps/instructor/views/tools.py (L121) .

This method iterates over the course and its children to find blocks with due dates. This iteration was taking too long unless the course is fetched with **depth** None, which brings all the children of the course, reason why this commit is created.
2022-04-25 09:43:50 -04:00
Kshitij Sobti
f3f604c25f fix: Disallow endorsements for replies to comments (#30310)
Disables the "endorsement" action for nested comments. Only top-level comments should support endorsement.
2022-04-25 16:13:10 +05:00
Kira Miller
4975051d6f Merge pull request #30297 from openedx/kiram15/ENT-5498
fix: allow for multiple customer idps
2022-04-23 12:25:54 -04:00
code-review-doctor
0f24c3b749 fix: some tests are skipped due to duplicate names (#29959)
Co-authored-by: Rebecca Graber <rebecca.s.graber@gmail.com>
2022-04-22 14:31:01 -04:00
Eugene Dyudyunov
4443608981 refactor: remove deprecated save option for anonymous_id_for_user (#30302)
https://github.com/openedx/public-engineering/issues/35
2022-04-22 13:41:10 -04:00
Simon Chen
3556151fc9 chore: upgrade edx-name-affirmation to 2.3.3 for new api docs (#30305)
Co-authored-by: Simon Chen <schen@edX-C02FW0GUML85.local>
2022-04-22 11:52:17 -04:00
Michael Terry
b8ecfed67d fix: use safer ip-chain logic when checking ip for embargos
Specifically:
- check ALL ip addresses in the client ip chain for blocking
- check RIGHTMOST ip address in the client ip chain for allowing

Before, we always checked the LEFTMOST ip address in both cases.

AA-1234
2022-04-22 11:15:02 -04:00
Kira
392c8fdba8 fix: quality fixes 2022-04-22 10:05:36 -04:00
Ahtisham Shahid
446392bf6a fix: Updated course live docs url (#30293) 2022-04-22 19:04:12 +05:00
Michael Terry
93c5fdf735 Merge pull request #30303 from openedx/mikix/outline-children
fix: guard access to course block children in outline tab data
2022-04-22 09:35:02 -04:00
Demid
da4a6d6103 feat: Implement feature flag to disable students un-enrollment (#29326)
Implements a feature flag DISABLE_UNENROLLMENT that is used to disable students un-enrollment for all courses. The Unenrollment option should be disabled when this feature is set to True.

ref: BB-4951

Co-authored-by: tinumide <tinuade@opencraft.com>
Co-authored-by: Tim McCormack <tmccormack@edx.org>
2022-04-22 13:24:23 +00:00
Michael Terry
ea6b5b9e3c fix: guard access to course block children in outline tab data
In some cases the course blocks API was returning a dict without
a 'children' key, which was causing a traceback.

If the course blocks API has no children, that's IS a problem, but
still better than erroring out due to a KeyError.

AA-1267
2022-04-22 09:08:03 -04:00
AsadAzam
0338aab681 feat: added flag to enable discussions mfe for everyone (#30292)
* feat: added flag to enable discussions mfe for everyone

* refactor: refactord condition

* refactor: refactor condition
2022-04-22 15:14:09 +05:00
Kira
2cbba5b4c8 fix: PR requests 2022-04-21 16:33:56 -04:00
Kira
5d7f340b5f fix: formatting fix 2022-04-21 16:02:44 -04:00
Kira
6abe831d7a fix: allow for multiple customer idps 2022-04-21 15:38:19 -04:00
Tim McCormack
8bcec1a7c9 build: Remove empty coursegraph module (and the pylint reference to it) (#30273)
Coursegraph was moved from openedx to cms in commit 92552e50/PR #29156;
module init file was reintroduced in commit 80f9f1de/PR #30197, I think
by accident.
2022-04-21 19:33:38 +00: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
Diana Huang
42d0852b64 feat: Update Inc. to LLC. (#30294) 2022-04-21 15:11:16 -04:00
Kaustav Banerjee
702866b225 feat: delete XModuleDescriptorToXBlockMixin (#29927)
This:
1. Deletes XModuleDescriptorToXBlockMixin
2. Deletes `metadata_traslations` and `_translate()` from `XmlParserMixin`,
    and all related implementations.
3. Removes translations of deprecated OLX attributes during import/export:
    <old_attr> : <new_attr>
    - 'slug' : 'url_name'
    - 'name' : 'display_name'
    - 'id' : 'discussion_id' (Discussion XBlock)
    - 'for' : 'discussion_target' (Discussion XBlock)
    - 'attempts' : 'max_attempts' (CAPA)
2022-04-21 16:15:00 +01:00
Michael Terry
48b0df4f99 Merge pull request #30281 from openedx/mikix/minor-api-cleanup
fix: remove a couple unused learning MFE serializer fields
2022-04-21 09:27:04 -04:00
bszabo
d2e82b7d99 Merge pull request #29779 from open-craft/jill/TNL-8746
[BD-14] Install the blockstore app into edx-platform, behind a waffle switch
2022-04-21 09:04:47 -04:00
Usama Sadiq
73c7c4e6b8 BOM-3372: Remove lxml constraint (#30291)
* chore: remove lxml constraint
2022-04-21 15:10:02 +05:00
Jillian Vogel
d0935d467c fix: fixes bug with HTML blocks in studio_view
Rendering asset URLs requires HTML blocks to be associated with a course key.
This change allows HTML blocks to be associated with libraries and still
render without error.
2022-04-21 09:39:59 +01:00
Jillian Vogel
732d8cb337 fix: use mako prefix lms. when XBlock runtime renders in Studio/authoring MFE
When the XBlock runtime is used in Studio/authoring mode, it needs to
use the template path prefix "lms." in order to locate the block
templates. (In LMS view, no prefix is required.)

Fixes bug introduced by https://github.com/openedx/edx-platform/pull/29354
and removes template workaround added by
https://github.com/openedx/edx-platform/pull/29517 (see Author Notes & Concerns)
2022-04-21 09:39:59 +01:00
Jillian Vogel
8b77638bf0 test: refactors blockstore integration tests to run as unit tests.
Tests which @requires_blockstore (i.e. the Blockstore service) have
been made to run as a unit test using the installed Blockstore app, and
will be run by the platform CI.

The Blockstore service tests can still be run manually by setting
EDXAPP_RUN_BLOCKSTORE_TESTS=1

Related fixes:

* adds blockstore bundle storage settings
* let the studio devstack and test servers serve static files from
  the /media URL This allows the blockstore/content libraries API to
  serve blockstore assets in dev.
* Wrap ContentLibrary creation in an atomic transaction, so that if it
 fails, the related bundle can be deleted directly from the database
  during the exception handler. (Previously, we called a REST API which
  deleted it as part of a separate service.)
2022-04-21 09:39:59 +01:00
Jillian Vogel
7d81c3e671 test: minor fixes to requires_blockstore tests
These tests aren't run as part of the CI, and so have been failing for
an unknown time.
2022-04-21 09:39:59 +01:00
Jillian Vogel
cfd53aff70 refactor: installs blockstore into edx-platform
* adds blockstore as a requirement and an installed app, with
  configurable bundle storage settings.
* adds waffle switch and setting to allow use of blockstore's python API
  instead of REST API in live testservers and in production.
* adds database router which, when a `blockstore` DATABASE connection is
  configured, allows the platform to use the blockstore service's
  database instead of the default edxapp database.
* replaces blockstore_api exceptions and models with blockstore.app.api classes
* minor fixes to the blockstore_api to make the Blockstore REST API
  return data packaged the same as the Blockstore Python API.
2022-04-21 09:39:54 +01: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
John Nagro
a5e911fe1d feat: release edx-enterprise 3.44.4 (#30289)
- fix: implement back-off and retry for degreed2
- fix: drop tpa_hint param in redirects when no SSO

ENT-5728
ENT-5741
2022-04-20 17:24:38 -04:00
Hassan
4569b53bad Merge pull request #30070 from openedx/hassan/dump-course-ids-filter
feat: Added management command dump_course_ids_with_filter.
2022-04-20 10:24:02 -05:00
edx-pipeline-bot
6eda9b6d1f Merge pull request #30284 from openedx/private_to_public_a251d18
Mergeback PR from private to public.
2022-04-20 10:56:28 -04: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
Justin Hynes
1435b619b4 Merge pull request #30271 from openedx/jhynes/microba-1507_process-scheduled-tasks
feat: add support for processing scheduled instructor tasks
2022-04-20 09:14:31 -04:00
Muhammad Adeel Tajamul
a7f51ee762 Merge pull request #30282 from openedx/inf-41
fix: hyperlinks opening in iframe in discussions mfe
2022-04-20 16:58:55 +05:00
adeel.tajamul
8c6f307de8 fix: hyperlinks opening in iframe in discussions mfe 2022-04-20 15:21:30 +05:00
Usama Sadiq
1df2c691db fix: bump bleach and django-wiki versions (#30263) 2022-04-20 10:39:50 +05:00
Michael Terry
e10b817369 Merge pull request #30280 from openedx/mikix/more-enrollment-conditions
fix: add more can-enroll checks to course home outline API
2022-04-19 16:11:29 -04:00