Commit Graph

63209 Commits

Author SHA1 Message Date
Mubbshar Anwar
c55f0961ba fix: update event property (#32479)
Update event property name which was added to measure the conversion rate of registration through on ramp experience.

VAN-1478
2023-06-16 09:06:25 +05:00
Jesper Hodge
a6c57811cd feat add xblock api endpoint (#32282)
* feat: add xblock endpoint for updating an xblock

fix: remove debugger

feat: make function call more generic

refactor: just use request.json for request data as before

refactor: extract method

fix: revert wrong method change

fix: refactor correct method

feat: use handle_xblock method so that we can do more than update xblocks

fix: usage_key_string defaults to None

add all CRUD operations

fix usage key parameter

refactor: create /views folder

refactor: move xblock view functions to xblock_services

fix: tests

fix: tests

refactor: move xblock API endpoint to contentstore

* docs: add explanatory comment to new xblock_service

* feat: add feature flag for enabling content editing api

* feat: raise 404 if studio content api is disabled

* tests: test xblock endpoint

* test: make all post tests work

* test: check that xblock_handler receives correct args

* refactor: create util mixin for course factories with staff

* refactor: extract course staff authorization tests

* refactor: extract tests to api view testcase class

* test: add get tests

* test: fix tests

* test: fix tests

* test: fix tests

* test: add all crud tests

* fix: refactor to fix tests

* fix: merge conflict

* fix: merge conflict

* fix: tests after merge

* fix: json request decorator

* fix: lint

* fix: lint

* fix: lint

* fix: lint

* fix: new test files

* fix: lint

* fix: lint and apply PR suggestions

* fix: lint

* fix: lint

* fix: lint

* fix: lint

* fix: lint

* fix: lint
2023-06-15 14:17:49 -04:00
Robert Raposa
e7e4fa3935 temp: remove flaky test_login_and_registration_form_ratelimited (#32459) 2023-06-15 11:43:17 -04:00
Feanil Patel
82dde016f6 Merge pull request #32239 from openedx/feanil/migration_check
Migrate migration checks to `minimal.yml` config.
2023-06-15 11:06:14 -04:00
Feanil Patel
68aa7556c1 Merge pull request #32446 from openedx/feanil/fix_redudant_urls
fix: Update how we render the error pages.
2023-06-15 10:10:23 -04:00
Piotr Surowiec
e439b3f749 Merge pull request #32356 from open-craft/agrendalath/fc-0026-user-checks
feat: remove block-specific handling from runtime role checks [FC-0026]
2023-06-15 15:32:59 +02:00
Justin Hynes
2f8b7380fb Merge pull request #32463 from openedx/jhynes/APER-2504_changes-part-2
feat: add ability for `notify_credentials` to revoke program certs
2023-06-15 08:25:27 -04:00
Nawfal Ahmed
0aa92af0b2 fix: fix edge-case for completed courses in a subscription program (#32476) 2023-06-15 17:25:02 +05:00
Mubbshar Anwar
a62276b8ce feat: registration event property (#32447)
Registration event property to calculate conversion rate through on ramp experience.

VAN-1478
2023-06-15 17:20:43 +05:00
Zainab Amir
d5be2c8033 feat: Get welcome page context (#32426) 2023-06-15 17:09:47 +05:00
Jenkins
7a047021b1 chore(i18n): update translations 2023-06-15 07:01:31 -04:00
Awais Qureshi
6bef88c9f6 feat!: openedx-django-pyfs will now use boto3 to generate-urls. (#32453)
* feat!: openedx-django-pyfs will now use boto3 to generate-urls.
---------

Co-authored-by: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com>
2023-06-15 15:05:33 +05:00
ayesha waris
d3b1ce176a feat: adds waffle flag for show notifications tray (#32451)
* feat: adds waffle flag for show notifications tray

* refactor: refactored notifications count api code
2023-06-15 14:38:46 +05:00
Agrendalath
bc17163258 chore: update ora2 XBlock 2023-06-15 11:08:41 +02:00
Agrendalath
9fbc263edd feat: remove block-specific handling from runtime role checks 2023-06-15 11:08:03 +02:00
Matjaz Gregoric
bc8576a9bb chore: update PR template for Palm release 2023-06-15 08:31:20 +02:00
Muhammad Faraz Maqsood
65687857d5 enhancement: add support for caching programs for one site (#32380)
* perf!: add support for caching programs on per site bases
2023-06-15 11:29:22 +05:00
Jenkins
7b22a7c322 chore: geoip2: update maxmind geolite country database 2023-06-14 16:58:51 -04:00
Justin Hynes
2beaa1d260 feat: add ability for notify_credentials to revoke program certs
[APER-2504]

This is a companion to PR #32458. This updates the `notify_credentials` management command and adds an additional argument/switch (`--revoke_program_certs`).

If included, this option will be converted to a boolean and passed as a script option. Eventually, the `send_notifications` function (updated in the previously mentioned PR) will determine if we should fire a signal that checks if any program certs need to revoked.
2023-06-14 19:29:55 +00:00
Justin Hynes
e607bb1208 Merge pull request #32458 from openedx/jhynes/APER-2504_update-notify-credentials-to-revoke-prog-certs
feat: add ability for notify_credentials to revoke program certs
2023-06-14 14:38:39 -04:00
Alex Dusenbery
9ce54bc777 feat: edx-enterprise 3.67.0 | compare lowered emails 2023-06-14 12:58:21 -04:00
Justin Hynes
d427d404da feat: add ability for notify_credentials to revoke program certs
[APER-2504]

This PR adds additional functionality to the tasks kicked off when the `notify_credentials` management command is run.

I have added a new keyword arg (revoke_program_certs) that, if True, will check to see if we need to revoke a program certificate. This functionality was introduced to help automate fixing cases where a learner still has access to a Program Certificate even if they have been awarded all of the course certificates in a Program (see APER-2499).

The functionality has to be committed in two separate PRs because of our blue/green deployments. The task changes will come first, then we will update the management command to be able to set/pass the new settings. New settings were added as keyword args (defaulting to False) in order to ensure that we won't trip up our workers.
2023-06-14 16:29:43 +00:00
Kyle McCormick
3fab0aec65 build: import XModule source SCSS directly rather than copying (#32289)
The `xmodule_assets` command copies SCSS source files from
xmodule/css to common/static/xmodule/scss, renaming them
to `{MD5_HASH}.scss` in order to "remove duplicates".
The copied files are then included into the generated
SCSS entrypoint files (eg AnnotatableBlockStudio.scss).

The "de-deplication" is completely unnecessary: there are
only a couple dozen SCSS files, and none of them are duplicates.
This copying process is confusing, it complicates our
build process, and it makes our SCSS harder to understand.

So, in the generated SCSS entrypoint files, we
stop importing the *copied* SCSS sources, and just
import the *original* SCSS sources instead.
For example, common/static/xmodule/descriptors/scss/AboutBlockStudio.scss
is changed from:

    .xmodule_edit.xmodule_AboutBlock {
      @import "9bdcda00f046f78be79aca7791e1d4fb.scss";
      @import "a10fc3e0fd6aca63426a89e75fe69c31.scss";
    }

to:

    .xmodule_edit.xmodule_AboutBlock {
      @import "editor/edit.scss";
      @import "html/edit.scss";
    }

In order to make the `@import` lines work, we add xmodule/css to the list
of lookup dirs for XModule SCSS compilation. We also remove the
copying logic from `xmodule_assets`, as it is no longer needed.

Part of: https://github.com/openedx/edx-platform/issues/32292
2023-06-14 11:30:05 -04:00
Nawfal Ahmed
ee7213427c fix: fix alert icon unexpected behaviour (#32455) 2023-06-14 18:48:20 +05:00
Kaustav Banerjee
489e23983f feat: tpa automatic logout (#32193)
* feat: tpa automatic logout

* chore: modify toggle documentations

* chore: check TPA_AUTOMATIC_LOGOUT_ENABLED in _show_tpa_logout_link

* docs: modify method doc
2023-06-14 17:01:00 +05:00
Nawfal Ahmed
5204ee6981 feat: handle edge cases for purchased courses in a subscription program (#32438) 2023-06-14 16:28:49 +05:00
Awais Qureshi
4bd032ab15 chore: adding pin to avoid test failures. (#32440)
* chore: adding pin to avoid test failures.
---------

Co-authored-by: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com>
2023-06-14 12:44:39 +05:00
Muhammad Ammar
805d5c4005 Merge pull request #32445 from openedx/ammar/add-comment-for-signal
chore: add comment
2023-06-14 11:38:52 +05:00
Kristin Aoki
6f90724fb6 feat: update tab_handler to include blockId (#32392) 2023-06-13 15:41:47 -04:00
Feanil Patel
3b7facd565 fix: Add names to the error page urls.
Some of the static_template_view tests use names to get the URLs for the
error pages for testing, so I added names and updated the test to match
the new names.

I also updated the `test_404` function because we're no longer rendering
the 404 page in a different way from the 500 page so the response
includes the correct response code and content type.  This reduces the
number of differences between the 404 handler and the 500 handler.
2023-06-13 12:20:11 -04:00
Feanil Patel
0326b45d6a fix: Update how we render the error pages.
We were adding paths for the error pages in two places so one of them
simply wasn't being used. The lms urls.py also covered the 429 wich the
static_templates_view urls.py did not cover.  We don't need both and we
need the definition of the handlerNNN variables in urls.py to override
the default django error views so I'll leave just those.

I also made the `exception` parameter for the `render_404` function
optional by adding a default value.  We don't use the exception when
rendering the 404 page but the exception argument is a part of the
default method signature for the function that `render_404` replaces so
I didn't want to remove it and cause issues when django tries to call
this function.
2023-06-13 11:52:19 -04:00
Rômulo Penido
33e93a4c5e fix: styles issue for the "Upload a CSV file" field on the Instructor Dashboard (#32330)
Co-authored-by: o.bugaenko <oleksandr.buhaienko@raccoongang.com>
2023-06-13 10:43:49 -04:00
muhammad-ammar
2a24bf8c4f chore: add comment 2023-06-13 19:40:06 +05:00
Muhammad Bilal Tahir
45efafb07a Merge pull request #32435 from openedx/btahir/ENT-7260
feat: create user profile if not found in current job command
2023-06-13 17:36:27 +05:00
Muhammad Bilal Tahir
8693d5a4a6 feat: create user profile if not found in current job command 2023-06-13 17:07:17 +05:00
Jeremy Ristau
c7559f5697 Merge pull request #32273 from open-craft/field-data-refactor
Make Split Mongo's CachedDescriptorSystem load field-data service on demand
2023-06-13 08:05:49 -04:00
Awais Ansari
52a886d456 feat: filter notifications based on NOTIFICATIONS_EXPIRY (#32411)
* feat: add 2 months limit in notifications list API

* chore: add NOTIFICATIONS_MAX_DAYS in lms settings

* refactor: update NOTIFICATIONS_MAX_DAYS to NOTIFICATIONS_EXPIRY

* feat: add order_by reverse id in notificationslist API
2023-06-13 17:05:18 +05:00
Ahtisham Shahid
44d48f63ef refactor: removed notification app urls from cms (#32434) 2023-06-13 15:40:31 +05:00
Ahtisham Shahid
428849c8a2 fix: resolved spell issue in requirement file (#32433) 2023-06-13 14:47:45 +05:00
Muhammad Ammar
4e5cfaf295 Merge pull request #32389 from openedx/ammar/trigger-signals-to-import-course-details
feat: trigger signals to import and delete course details
2023-06-13 10:55:41 +05:00
John Nagro
b74138f2e6 feat: release edx-enterprise==3.66.8 (#32430) 2023-06-12 22:30:59 +00:00
Feanil Patel
fb7336dd24 Merge pull request #32428 from openedx/feanil/add_annotation
docs: Add an annotation for the ELASTICSEARCH_INDEX_PREFIX
2023-06-12 17:11:50 -04:00
Feanil Patel
9f0aeea6a6 docs: Add an annotation for the ELASTICSEARCH_INDEX_PREFIX
The feature was added to edx-search here: https://github.com/openedx/edx-search/pull/130#issuecomment-1586250567
2023-06-12 16:20:52 -04:00
Feanil Patel
c32514a453 test: Test both mysql 5.7 and 8 in one workflow.
Now that we're using standard service containers, we can use a matrix to
test both the current supported versions in one job.  This should also
make it easier to test with future versions as we get ready to upgrade.
2023-06-12 15:06:15 -04:00
Feanil Patel
640e35e731 test: Change how we test migrations.
Use the default settings file and the minimal.yml config to build the
migrations.
2023-06-12 15:06:15 -04:00
Feanil Patel
4338f55548 fix: Load the DATA_DIR via derived_settings tooling.
If we don't make the DATA_DIR a derived_setting, the only way to
override it is to override the entirety of the MODULESTORE config, or
override DATA_DIR in common.py in your fork.
2023-06-12 15:06:15 -04:00
Feanil Patel
74d1008102 fix: Be able to connect to SQL in containers from CMS
By default if you use `localhost` as the `HOST` value for mysql, it
tries to connect to a file socket on disk rather than trying to connect
to the loopback hostname.  This prevents us from running MySQL in a
container while running the LMS on your local machine.

Setting the host to `127.0.0.1` forces the SQL connection to go over TCP
instead. This allows you to map your container port to your localhost
without any issues.

We did this in lms/envs/common.py in an earlier change but did not
update cms/envs/common.py at that time.
2023-06-12 15:06:15 -04:00
Jenkins
435be23d2b chore(i18n): update translations 2023-06-12 11:41:13 -04:00
Ejaz Ahmad
563fe09a91 Merge pull request #32424 from openedx/eahmadjaved/enterprise-version-bump
chore: bumping enterprise package version to 3.66.6
2023-06-12 19:30:59 +05:00
Ejaz Ahmad
0ba2399f06 Merge pull request #32423 from openedx/jajjibhai008/upgrade-edx-enterprise-078bd91
feat: Upgrade Python dependency edx-enterprise
2023-06-12 19:05:07 +05:00