Commit Graph

10584 Commits

Author SHA1 Message Date
Robert Raposa
399be67fc4 style: remove eslint with frontend code removal ADR
- Add ADR for frontend code removal
- Drop eslint, as explained in the ADR
2025-03-20 11:03:41 -04:00
Muhammad Farhan
e9c52100ef fix: improve regex to exclude data: urls (#36415) 2025-03-20 19:33:10 +05:00
Hassan Raza
033bcda99d Hraza/add embargo restricted country (#36398)
* feat: add country disabling feature in embargo app

* revert: disabled countries list in env

* fix: resolved linter issues

---------

Co-authored-by: Hassan Raza <h.raza@192.168.1.12>
2025-03-19 12:22:45 +05:00
Muhammad Farhan
dcf95f4f6a fix: handle /jump_to_id/ URLs in course optimizer urls (#36400) 2025-03-18 19:25:30 +05:00
Ahtisham Shahid
e7100d813f Revert "feat: refactor country disable logic into the Embargo app (#36202)" (#36393)
This reverts commit 72959ad9d5.
2025-03-17 23:55:59 +05:00
Hassan Raza
72959ad9d5 feat: refactor country disable logic into the Embargo app (#36202)
* feat: add country disabling feature in embargo app

* revert: disabled countries list in env

* fix: resolved linter issues

---------

Co-authored-by: Hassan Raza <h.raza@192.168.1.12>
2025-03-17 16:07:18 +05:00
Bryann Valderrama
f90e59e52a docs: add event_type inline code annotation for open edX events (#36355) 2025-03-14 09:55:50 +01:00
Braden MacDonald
3b5edaa1ad chore: fix a few JS lint issues that eslint is warning about (#36177) 2025-03-13 10:08:02 -07:00
Navin Karkera
711d6aa357 refactor: downstream entity links api [FC-0076] (#36311)
Refactors downstream links API to handle multiple filters using a single API. Also adds a new route to return summary of library links for a given course.
2025-03-12 17:56:12 +00:00
Chris Chávez
f5fde97ae8 fix: Show tag count when paste a component in a course [FC-0046] (#36318)
* fix: Show tag count when paste a component in a course

* refactor: get_children_tags_count updated to get_tags_count
2025-03-12 18:09:12 +05:30
Rômulo Penido
6ce674a7a7 fix: set imported xblock parent (#36338)
Fixes a bug in which the index document was created while pasting a component with empty breadcrumbs field.
2025-03-10 19:11:27 +00:00
Saad Yousaf
fb31f82177 docs: update course optimizer toggle documentation to accurate represent toggles working 2025-03-07 17:56:30 +05:00
Hina Khadim
0054eb2d33 fix: Exclude Drag and Drop blocks from the link-scanning step in the Course Optimizer (#36321)
* fix: ignore drag and drop in course optimizer scanning links step
2025-03-07 11:32:57 +05:00
Chris Chávez
475d61729b feat: Enable library blocks using settings [FC-0076] (#36292)
LIBRARY_ENABLED_BLOCKS added to verify enabled blocks in get_allowed_block_types
2025-03-05 12:45:43 -05:00
Kyle McCormick
774b7e9821 refactor: Clean up CMS production settings cruft (#36306)
This is a pure refactoring of cms/envs/production.py, removing several
redundant statements that have accrued over the years as the platform moved
from python-only, to python+json, to python+json+yaml, to today's python+yaml
setup.

This is the CMS version of:
* a81493ce7f
* (originally 15939232d5)

Also included:

* Add some more explicit structure to the both LMS's and CMS's
  production.py using big comments.

* In both LMS and CMS settings, alphabetize the production overrides,
  and remove the extraneous comments. Separate out the handful of settings
  which have useful comments. The rest of the settings' comments were not
  helpful--they were either just stating the obvious, or they were duplicative
  of what's documented in common.py.

Co-Authored-By: Feanil Patel <feanil@axim.org>

Part of: https://github.com/openedx/edx-platform/issues/36215
2025-03-05 08:24:59 -05:00
Robert Raposa
468e1e3135 Merge pull request #36302 from ormsbee/remove-custom-startup
fix: remove custom startup to fix dev reloading
2025-03-04 08:35:19 -05:00
Muhammad Farhan
988801f3c0 fix: handle AttributeError in exception clause (#36317) 2025-03-04 13:05:04 +05:00
Peter Kulko
cf7e45cf4d feat: manage tag events for new Unit page (#35751) 2025-03-03 10:59:05 -03:00
David Ormsbee
c4f21b6931 fix: remove custom startup to fix dev reloading
The cms/startup.py and lms/startup.py files were created to
allow us to do a lot of custom initialization around things
like the ModuleStore, monkey-patching, adding MIME types to
our process, etc. As far back as 2017, we recognized that
this was a bad thing, marked these modules as "deprecated",
and started removing things or putting them in the standard
Django locations for them (0279181).

In its current state, these startup modules no longer do any
custom work, and just invoke django.startup(). But this is
meant for running Django code in "standalone" usage, e.g. if
you have a script that isn't a management command but needs
some Django functionality.

The "runserver" command used during development normally
launches a child process to serve requests and knows how to
kill and respawn that process when files are modified, so
that changes are reflected. It can also normally handle the
case where there's a SyntaxError in the child process, and
fixing that error will reload the code again.

Something about running django.startup() manually interferes
with this functionality in "runserver". It still reloads the
code in response to changes, but if the code gets into a
broken state for any reason (like a syntax error), the master
process itself dies. That causes the container to restart,
only to die again shortly afterwards in a loop until the
error is fixed. The container restarts will break any shell
you had opened into the container, as well as any IDE
integrations that connected to that container to access the
files and Python instance.

Getting rid of the custom startup code fixes this and moves
us one small step closer to being a more normal Django
project.
2025-02-28 23:16:05 -05:00
Muhammad Farhan
0e0d1dab95 feat: Add test for detecting broken and locked links (#36286) 2025-02-26 12:09:23 +05:00
Rômulo Penido
9451cfca26 feat: add API to return list of downstream blocks for an upstream [FC-0076] (#36253)
Adds the API for listing downstream contexts and parents for a given publishable entity.
2025-02-25 13:55:02 -05:00
Muhammad Afaq Shuaib
b83c8495e1 chore: add TRANSCRIPT_LANG_CACHE_TIMEOUT setting variable in common setting envs (#36296)
* chore: add TRANSCRIPT_LANG_CACHE_TIMEOUT setting variable in common setting envs
* chore: bump edx-val version
2025-02-25 20:07:14 +05:00
Bryann Valderrama
a2bb8c9458 refactor!: remove ENABLE_HOME_PAGE_COURSE_API_V2 feature toggle (#36181) 2025-02-24 16:42:06 +01:00
Muhammad Faraz Maqsood
2798f28c2a fix: send correct status for scanning 2025-02-24 13:31:08 +05:00
Chris Chávez
b6489e718c feat: Video editor supports transcripts [FC-0076] (#36058)
* Add error handler on save video to avoid creating sjson
* Support transcripts without edx_video_id in definition_to_xml
* When copying a video from a library to a course: Create a new edx_video_id
* Save transcripts as static assets in a video in a library when adding a new transcript.
* Delete transcripts as static assets in a video in a library when deleting transcripts.
* Support download transcript in a video in a library.
* Support replace transcript in a video in a library.
* Support updating transcripts in video in a library.
* Refactor the code of downloading YouTube transcripts to enable this feature in libraries.
* Support copy from a library to a course and a course to a library.
2025-02-21 13:33:13 -05:00
Maria Grimaldi
6c6fd84e53 fix: import authoring filter from content_authoring instead (#36109)
Correctly name authoring subdomain according to DDD docs: https://openedx.atlassian.net/wiki/spaces/AC/pages/663224968/edX+DDD+Bounded+Contexts
2025-02-21 14:55:50 +01:00
Peter Kulko
0319d62a78 feat: course unit - edit iframe modal window (#35777)
Adds logic to support the functionality of editing xblocks via the legacy modal editing window.
2025-02-20 17:02:43 -03:00
michaelroytman
c9beec776f feat: make computation of due date for edx-proctoring powered exams consistent
This commit fixes an inconsistency in the way an exam due date is computed for courses that do not use an LTI based proctoring provider.

The edx-exams microservice was released last year to provide support for LTI based proctoring providers. After the release of this microservice, all proctoring requests initiated by the platform began to be funneled through the microservice, which acted as a broker for these requests, routing them directly to the service for exams in courses using an LTI based proctoring provider or to the platform edx-proctoring plugin for all other cases.

There is an asynchronous task in the platform that syncs exams from the platform to either the edx-exams microservice or the edx-proctoring plugin. Prior to the release of the microservice, this task computed the due date on exams as the exam subsection due date if the course was instructor-paced or None. After the release of the microservice, the task computed due dates differently than before. The due date on exams was computed as the due date on the exam, if there was one, or the end date of the course, if there was one, or None. This differed from the prior definition.

This resulted in inconsistent due date behavior. The exams in courses that were published or republished after the edx-exams microservice was released had the new computation of due date, while exams in courses that were published or republished before the edx-exams microservice was released had the old computation of due date.

This causes an issue for all exams in courses using non-LTI based providers. This is because the due date on exams across all courses that either do not use proctoring or that use a non-LTI based provider are inconsistent, depending on when they were last published.

This commit reintroduces the old computation to the task for exams in courses using a non-LTI based proctoring provider (i.e. those courses whose exams are not powered by the edx-exams microservice). In order to maintain the functionality of edx-exams, we continue to compute the due date as before for exams in courses using an LTI based proctoring provider (i.e. those courses whose exams are powered by the edx-exams microservice).
2025-02-20 09:44:35 -05:00
Kyle D. McCormick
6124695fdf refactor: Remove broken Force-Publish UI from Studio
Co-Authored-By: Feanil Patel <feanil@axim.org>
2025-02-19 09:07:57 -05:00
Kyle McCormick
569c2d9ad2 Revert "fix: Remove pointless Maintenance and Announcement apps (#35852)"
This reverts commit 9274852f2d.
2025-02-19 09:07:57 -05:00
Chris Chávez
d29ff63e2c fix: Render Word cloud block editor in libraries [FC-0076] (#36199)
* fix: Render Word cloud and conditional block editor

- The xmodule-type to render is MetadataOnlyEditingDescriptor
- The xmodule type `MetadataOnlyEditingDescriptor` renders a `<div>` with the block metadata in the `data-metadata` attribute. But is necessary to call `XBlockEditorView.xblockReady()` to run the scripts to build the editor using the metadata.
- To call XBlockEditorView.xblockReady() we need a specific require.config

* fix: Adding save and cancel button

* fix: save with studio_submit of conditional_block and word_cloud_block

* test: Tests for studio_submit of conditional and word cloud

* revert: Delete studio_submit of conditional block. It is not supported

* style: Fix lint

---------

Co-authored-by: Navin Karkera <navin@opencraft.com>
2025-02-19 18:05:55 +05:30
Navin Karkera
a1d0826a2a feat: entity link view and api (#36190)
Adds api for listing upstream entity links for a given course.
2025-02-18 15:34:00 +00:00
Jillian
c02e567201 Make copied tags editable again after breaking the upstream link to library content [FC-0076] (#36228)
When deleting an upstream library block, ensure that any tags that may have been copied to downstream blocks are made editable again. This is achieved by un-setting the `is_copied` flag on the downstream tags.
2025-02-13 11:53:05 -05:00
Chris Chávez
0bede61246 fix: Advanced editor styles [FC-0076] (#36221)
* Adds padding to the text of the competition block editor.
* Fix the style of the Save and Cancel buttons of the PDF block editor.
* Moves the Save and Cancel buttons to the bottom of the modal.
* Moves the Save and Cancel button to the right.
* Which edX user roles will this change impact? "Course Author"
2025-02-13 11:21:32 -05:00
Irtaza Akram
a8a8ae3286 fix: replace pkg_resources with importlib.resources (#36213) 2025-02-13 17:43:07 +05:00
Muhammad Faraz Maqsood
9ae7566b1c fix: studio edx.org-next theme
Attaching jira ticket for reference: https://2u-internal.atlassian.net/browse/TNL-11731

- compile_sass script was generating the `studio-main-v1.scss` file but it wasn't correct and wasn't picking the changes from paragon. As a result, `edx.org-next` theme wasn't being applied to the studio. And the reason was this line: https://github.com/openedx/edx-platform/pull/35233/files#:~:text=//%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D-,%40import%20%27_builtin%2Dblock%2Dvariables%27%3B,-%40import%20%27bourbon.
- This PR fixes the studio theme as I have rearranged `studio-main-v1.scss` file so that theme changes can be applied correctly.
2025-02-12 18:29:59 +05:00
Peter Kulko
925716415c chore: iframe rendering optimization (#35959)
Iframe reload optimizations for various xblock related actions. Added some improvements related to scrolling to the current xblock. Fixed behavior of the xblock action dropdown list.
2025-02-11 16:30:38 -03:00
Navin Karkera
2598084946 feat: upstream downstream link model [FC-0076] (#36111)
Adds models, tasks, signal handlers and api's for adding, updating and deleting upstream->downstream links in database.
2025-02-11 12:15:50 -05:00
Raymond Zhou
30039845a4 revert: remove problematic test code (#36238) 2025-02-10 16:12:26 -05:00
Tim McCormack
56cf4ab9cd test: Add mock configs for testing production.py (#36237)
The values are nonsensical but this should be a fairly complete collection
of settings, both at the top level and in sub-dictionaries.

While edxapp will not work properly with these settings, the following
commands should work:

```
DJANGO_SETTINGS_MODULE=lms.envs.production LMS_CFG=lms/envs/mock.yml ./manage.py lms dump_settings
DJANGO_SETTINGS_MODULE=cms.envs.production CMS_CFG=cms/envs/mock.yml ./manage.py cms dump_settings
```
2025-02-10 14:52:34 -05:00
Deborah Kaplan
29de9b2dc4 feat!: Legacy account, profile, order history removal (#36219)
* feat!: Legacy account, profile, order history removal

This removes the legacy account and profile applications, and the order
history page. This is primarily a reapplication of #31893, which was
rolled back due to prior blockers.

FIXES: APER-3884
FIXES: openedx/public-engineering#71


Co-authored-by: Muhammad Abdullah Waheed <42172960+abdullahwaheed@users.noreply.github.com>
Co-authored-by: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com>
2025-02-10 14:39:13 -05:00
Daniel Valenzuela
36c16d6952 fix: static assets used in problem bank and library content block (#36173)
Static assets were not being copied into the course when using library content via Problem Bank or "Add Library Content" workflows.
2025-02-07 10:30:05 -08:00
Saad Yousaf
eaf6f66828 fix: styling fix for course optimizer legacy tool link 2025-02-07 15:46:19 +05:00
Raymond Zhou
02fc9c928f 2u/course optimizer (#35887) 2025-02-06 12:47:17 -05:00
Jesper Hodge
1f43d17b21 Revert "Replace pkg_resources with importlib.resources" (#36208) 2025-02-05 08:51:50 -05:00
Kyle McCormick
32275662b0 feat!: A Better API for Derived Settings (#36192)
The Python API for declaring derived settings was confusing to the uninitiated
reader, and also prone to spelling mistakes. This replaces the API with one
that is more readable and more concise, and updates the implementation of
`derive_settings` to properly derive settings declared using the new API.

BREAKING CHANGE: The `derived` and `derived_collection_entry` function are
replaced with the `Derived` class. We do not expect those functions to have
been used outside of edx-platform, but if they are, this commit will cause them
to loudly ImportError.

Note that there should be NO change in behavior to the `derive_settings`
function, which we DO know to be used by some external edx-platform plugins.

Part of: https://github.com/openedx/edx-platform/issues/36215
2025-02-04 14:57:43 -05:00
Usama Sadiq
1a16073ad0 fix: enable pylint warnings (#36196) 2025-02-03 14:18:11 +05:00
Rômulo Penido
4f13ee0171 fix: advanced editor styling on library authoring [FC-0076] (#36146)
Fixes the styles for the advanced editors (poll, survey, LTI Provider, etc). Updated the code if `xblock_v2/xblock_iframe.html` to use `course-unit-mfe-iframe-bundle.scss`
2025-01-30 17:36:21 +00:00
Navin Karkera
5e51e2d5b7 fix: swagger docs ref_name conflicts (#36189)
* fix: swagger docs ref_name conflicts

* fix: swagger auto doc errors

* chore: bumps openedx-learning==0.18.2

---------

Co-authored-by: Jillian Vogel <jill@opencraft.com>
2025-01-30 20:32:18 +05:30
Usama Sadiq
b6828cecaa fix: enable pylint warnings (#36195)
* fix: enable pylint warnings
2025-01-30 17:15:33 +05:00