Commit Graph

9877 Commits

Author SHA1 Message Date
Tim McCormack
279e4d0b67 feat: Use new configurable producer API for event bus (#31356)
This involves a breaking-change update to edx-event-bus-kafka 2.0.0.
2022-11-28 18:41:35 +00:00
Arunmozhi
54507c1e08 feat: allow overriding TinyMCE config using settings
The TinyMCE configuration can be overridden by adding a
`TINYMCE_CONFIG_OVERRIDES` dict to the `JS_ENV_EXTRA_CONFIG`.
2022-11-23 19:55:28 +01:00
connorhaugh
fe15171209 feat: author permission studio xblock handler (#31239)
Conversation around a hasty fix for security reasons led to a fix-forward improvement. You can find that conversation here. #31221 .
2022-11-18 16:39:51 -05:00
Shahbaz Shabbir
ee6f3164c3 feat: add course enrollment email task (#31241) 2022-11-18 17:25:52 +05:00
Kshitij Sobti
de0b132f10 fix: delay creation of course topics after course publish (#31307)
When running in a sharded MongoDB setup it's possible that querying the
modulestore right after the course publish signal will not return the
latest data.

This commit adds a delay similar to the one used in other places in the
codebase for a similar reason.
2022-11-18 16:49:29 +05:00
Maximiliano Fernandez
5fa05289a4 fix: remove course pre requisite only if is not entrance exam (#22529)
See details in the related PR

Co-authored-by: Omar Al-Ithawi <i@omardo.com>
Co-authored-by: Shadi Naif <shadinaif@gmail.com>
2022-11-17 08:20:38 -04:00
0x29a
d6c6a44ed5 refactor: remove prefer_xmodules
This function is no longer needed as all XModules have been converted to XBlocks.

XBLOCK_SELECT_FUNCTION Django setting is removed too, as it could take only `prefer_xmodules` or `default_select` values.
2022-11-16 13:08:22 +01:00
Piotr Surowiec
f419d6b194 feat: deprecate track_function and publish in ModuleSystem [BD-13] (#30046)
* feat: delete `track_function` from ModuleSystem

* feat: delete `publish` argument from ModuleSystem
2022-11-15 10:46:24 -05:00
Zachary Hancock
b4ea4f1da5 fix: edx-exams request data/headers (#31290) 2022-11-14 14:11:52 -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
Jenkins
23f49f4607 chore(i18n): update translations 2022-11-06 15:58:01 -05:00
edx-transifex-bot
4b7eef2ea4 chore(i18n): update translations (#31231)
Co-authored-by: Jenkins <sre+jenkins@edx.org>
Co-authored-by: Tim McCormack <tmccormack@edx.org>
2022-10-31 15:55:09 +00:00
Zachary Hancock
01f14dbc2d test: update exams test to use split modulestore (#31223) 2022-10-28 11:49:17 -04:00
Sagirov Eugeniy
8f88422c4a test: prepare tests for removing support for children in Old Mongo 2022-10-28 11:43:20 -04:00
connorhaugh
f9c39375cc fix: studio edit permissions (#257)
Per 12. Make your fix public. 
I am merging this fix.
2022-10-27 10:12:28 -04:00
Usama Sadiq
4734f9f16e fix: bump pylint version (#31084) 2022-10-27 12:19:09 +05:00
Sagirov Eugeniy
3f3d0d25d8 feat!: Remove inheritance-related code from Old Mongo 2022-10-24 11:58:44 -04:00
Jenkins
d4fab3baaf chore(i18n): update translations 2022-10-24 10:44:58 -04:00
Rebecca Graber
b8d13812a4 feat: remove constraint on and upgrade openedx-events, edx-event-bus-kafka (#31182)
This will remove the "effort" field from COURSE_CATALOG_INFO_CHANGED event data
2022-10-24 08:03:01 -04:00
Jenkins
02e739d3df chore(i18n): update translations 2022-10-19 12:50:43 -04:00
Kristin Aoki
cb51735333 feat: add thumbnail field to video xblock fields 2022-10-12 15:40:39 -04:00
Jenkins
3bd94f78f9 chore(i18n): update translations 2022-10-09 16:58:34 -04:00
Kristin Aoki
0d0f9e7b3c feat: add video_images_upload_enabled api so new video editor knows val 2022-10-05 11:09:24 -04:00
Jenkins
8f90ba5f32 chore(i18n): update translations 2022-10-04 16:54:59 -04:00
Piotr Surowiec
fcb594d635 Merge pull request #30715 from open-craft/agrendalath/bd-13-deprecate_course_id
refactor: deprecate course_id from ModuleSystem [BD-13]
2022-09-26 14:23:11 +02:00
Jenkins
d308a6affa chore(i18n): update translations 2022-09-25 17:22:34 -04:00
Agrendalath
dd97c74fde refactor: deprecate course_id from ModuleSystem
This attribute is already deprecated for XBlocks in favour of directly
retrieving it like `block.scope_ids.usage_id.context_key`.

This commit also removes some redundant logging code which was omitted in the
Datadog removal in #19420.
2022-09-21 18:53:45 +02:00
Agrendalath
668683559b refactor: deprecate static_url argument from ModuleSystem
This argument was officially used only by the ProblemBlock.
If you need to get the base URL for static assets in your XBlock, please use
`settings.STATIC_URL` directly, instead of `runtime.STATIC_URL`.
2022-09-21 18:28:44 +02: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
Tim McCormack
f6965b9555 chore: Unpin edx-event-bus-kafka and upgrade (#30966)
The producer API is stable enough now.

Make use of new topic prefixing feature for devstack (introduced in 0.6.2)
2022-09-19 19:43:34 +00:00
Sagirov Evgeniy
42246c858d feat!: remove code related to Old -> Split migration (#30955)
This commit removes code that was used to copy Old Mongo courses into
new Split Mongo courses. This includes both the migrate_to_split
management command, as well as the backend code that would be invoked
to re-run Old Mongo courses as Split courses using Studio (the UI for
this was already removed in b429e55c).

This is a part of the Old Mongo removal effort tracked in:
  https://github.com/openedx/public-engineering/issues/62
2022-09-19 10:51:40 -04:00
Kshitij Sobti
a923cfc32e feat: Add mechanism to migrate discussion blocks to discussion flag (#30931)
The new mechanism for marking that a unit has discussions is to use the
discussion_enabled flag instead of adding a discussion block. This change
adds code that is run during the course rerun process to mark any existing
units that have a discussion block as discussible using the new mechanism.
It doesn't touch the existing discussion blocks.

If the new discussions configuration experience is globally enabled, this
will also switch from the legacy provider to the new provider. It analyses
the course for any discussion blocks that have been added to graded
subsections, and if that is the case, it also automatically enables
discussions in graded subsections (which are otherwise disabled for new
courses by default).
2022-09-19 16:56:50 +05:00
Sandeep Dubey
51b5e624b3 feat: upgrade TinyMCE v4.0.20 to TinyMCE v5.5.1 (#30335)
Co-authored-by: Arunmozhi <arunmozhi@opencraft.com>
2022-09-19 12:43:19 +02:00
Jenkins
bdb0e4d8ad chore(i18n): update translations 2022-09-18 16:57:26 -04:00
Sarina Canelake
cf5fa64bd7 fix: update repo paths that stayed in the edx org
Co-authored-by: Kyle McCormick <kdmc@pm.me>
2022-09-15 14:52:28 -04:00
Sarina Canelake
4a2f231302 fix: fix github url strings (org edx -> openedx) 2022-09-15 14:52:28 -04:00
Sagirov Evgeniy
b429e55cac feat!: remove Studio editing for Old Mongo Courses
This removes user-facing Studio edit support for Old Mongo courses
(courses that have a CourseKey of the format {org}/{course}/{run}).
This does not affect our normal courses, which have CourseKeys
starting with "course-v1:".

After this commit:

* Old Mongo courses will continue to appear on the Studio course
  listing page, but are not clickable.
* Any attempt to directly access an Old Mongo course in Studio via URL
  fail with a 404 error.
* Course certificates will still be available for Old Mongo courses.
* Old Mongo courses will continue to be returned by CourseOverviews
  and get_course_summaries() calls.

We decided against removing Old Mongo courses from the listing entirely
because that would require very expensive CourseOverviews query to
filter them out. Making that query more efficient would involve a
database migration to add appropriate indexing, which is something else
that we are looking to avoid. CourseOverviews are used everywhere in
the system, so we want to avoid changing how they work so that we can
minimize risk.

This is part of the Old Mongo Modulestore deprecation effort:
  https://github.com/openedx/public-engineering/issues/62
2022-09-14 10:53:33 -04:00
Jenkins
c77da05044 chore(i18n): update translations 2022-09-12 15:47:51 -04:00
Eugene Dyudyunov
74daecb155 fix: empty signature added after every certificate saving (#30912)
A new behaviour:

- Empty signature is still added when initially create a certificate;
- Empty signature isn't added when certificate has at least one signature.
2022-09-12 09:18:05 -04:00
Kristin Aoki
d111be5375 feat: add check for new video editor waffle flag 2022-09-09 13:57:50 -04:00
alangsto
92b60f11b2 feat: add lti proctoring provider option (#30950) 2022-09-08 13:53:23 -04:00
Kshitij Sobti
3cd3c60b59 feat: enable unit-level control over discussions by default (#30903)
This PR changes the default behaviour of the discussions experience by making the previous "unit-level
visibility" the default mechanism for configuring discussions.

Prior to this PR, under the new discussions configuration experience, all units would automatically get
assigned a discussion topic and have discussions enabled for them (other than units in graded or exam
subsections). However, if authors wanted they could enabled a custom visibility mode which would allow
toggling discussions on or off on a per-unit level.

This PR makes this custom visibility mode the standard behaviour (and eventually, only behaviour)
and enables discussion for all units by default. This replicates the behaviour that already existed,
however, now gives authors control over disabling discussions for individual units by default.

It also removes the ability to disable discussions for all units (while still keeping course-wide
discussions) enabled.
2022-09-07 16:41:17 +05:00
Kristin Aoki
601904c6ad fix: readability of course creator access request button text 2022-09-06 15:41:57 -04:00
Tim McCormack
322c22a4eb chore: Upgrade event-bus-kafka to 0.6.0 (#30934) 2022-09-01 17:27:34 +00:00
Eugene Dyudyunov
ff33fc1014 fix: studio registration using the LMS SSO (#30855)
* fix: studio registration using the LMS SSO

Add the social-core settings:
```
INACTIVE_USER_LOGIN = True
INACTIVE_USER_URL = 'http://localhost:18010'
```

Change the registration link's `next` parameter to trigger SSO login
after the registration.
2022-09-01 11:25:22 -04:00
Rebecca Graber
c1009b56f6 feat: emit COURSE_CATALOG_INFO_CHANGED signal on publish (#30805)
Implements https://github.com/openedx/edx-platform/issues/30682

Produce signal only once transaction for a course publish is
committed, and only for actual courses (not libraries).

- Use newer openedx-events version that has a fix for None datetime
  and that has CourseCatalogData without org, number.
- Add edx-event-bus-kafka -- specify recent version that drops
  confluent-kafka from explicit deps, fixes common auth settings, and has
  a multi-producer caching tweak.
- New functionality is behind toggle

As per https://github.com/openedx/openedx-events/issues/88 we're going to
try explicit dependencies on implementations for now, rather than solve
all the problems we'd encounter by using private dependencies.

Co-authored-by: Tim McCormack <tmccormack@edx.org>
Co-authored-by: Rebecca Graber <rgraber@edx.org>
2022-08-24 16:39:24 +00:00
Kristin Aoki
36439bb047 feat: add static full url to asset response 2022-08-24 09:02:04 -04:00
Justin Hynes
e02fabbda1 Merge pull request #30851 from openedx/jhynes/fix_devstack_credentials_port_numbers
fix: Override Credentials service URLs in Studio devstack.py files
2022-08-22 08:33:26 -04:00
Shafqat Farhan
a791759202 feat: VAN-1051 - Integrated Optimizely fullstack Client and experiment 2022-08-22 14:33:25 +05:00
Peter Kabiri
41ee16a6b7 fix: Removed hardcoded social media and mobile store images. (#30630) 2022-08-17 17:51:06 +05:00