Commit Graph

66698 Commits

Author SHA1 Message Date
Serhii Nanai
fa2eddb775 docs: update docstring for prerequisite course serializer 2025-08-28 17:58:06 +03:00
Andrii
42d30601b2 fix: remove redundant test which breaks everything 2025-07-04 15:50:16 +03:00
Andrii
722c73f771 refactor: add missing docstrings, rename * remove some fields 2025-06-27 18:51:21 +03:00
Andrii
3c47f1cc47 refactor: fix prerequisites source 2025-06-24 15:07:25 +03:00
Andrii
ca437883b7 refactor: add some fields to serailizer for FE & update API docstring 2025-06-19 17:55:14 +03:00
Andrii
c43e1be4a8 feat: extend courseware api with new fields 2025-06-03 18:17:41 +03:00
Braden MacDonald
334c0fee51 feat: REST API to publish the changes to a container in a library (#36543)
* feat: REST API to publish the changes to a container

* fix: trigger LIBRARY_CONTAINER_UPDATED when component published
   for components in containers.

---------

Co-authored-by: Jillian Vogel <jill@opencraft.com>
2025-04-17 22:05:44 -07:00
Tim McCormack
a960cdff8d fix: Add much more codejail darklaunch info; fix remote error bug (#36534)
- Fix bug where we were overwriting `remote_emsg` with None, and add test
  that would have caught it.
- Suppress differences due solely to the codejail sandbox directory name
  differing (in stack traces), and add test for this. Configurable because
  we'll need to add an additional search/replace pair for the sandbox venv
  paths.
- Add a variety of custom attributes, replacing existing ones. The attrs
  now have a prefixed naming scheme to simplify searching.
- Add slug to log output so we can more readily correlate traces and logs,
  as well as logs across services.
- Fix typo in error message.
- Fix existing import sort order lint.
2025-04-17 15:39:47 -04:00
Ivan Niedielnitsev
505b4f466c feat: Models for import_from_modulestore (#36515)
A new application has been created, described in this ADR:
https://github.com/openedx/edx-platform/pull/36545

have been created, as well as related models for mapping original content and
new content created during the import process. Python and Django APIs, as well
as a Django admin interface, will soon follow.
2025-04-17 19:03:46 +00:00
David Ormsbee
fd7ce0e273 feat: record the user for library content writes (#36513)
We were previously not recording who was doing write/delete/reset operations.
Prior to openedx-learning 0.23.0, we didn't have a place to write the user for a
reset-to-publish.

Upgrades the openedx-learning pin, 0.22 -> 0.23
2025-04-16 20:17:05 +00:00
Sarina Canelake
d2b7e64697 docs: Point to nvmrc for the official Node version (#36533) 2025-04-16 15:45:58 -04:00
Chris Chávez
581596b52b fix: Transcripts in downstream creation [FC-0076] (#36509)
* Fix the issue described in https://github.com/openedx/frontend-app-authoring/issues/1352#issuecomment-2791305416
2025-04-16 17:11:03 +00:00
Tim McCormack
3fac56b407 Merge pull request #36521 from openedx/timmc/cj-dl-more
Restructure codejail darklaunch to better capture errors, fix globals pollution.
2025-04-16 09:51:40 -04:00
Ahtisham Shahid
af40ac0feb feat: update preference config when version is changed (#36518) 2025-04-16 15:39:22 +05:00
Braden MacDonald
336fb018fb feat: support pasting units from courses into libraries (#36516)
* fix: don't allow pasting xblocks with children into libraries
* fix: IntegrityError: "Column 'md5_hash' cannot be null"
* feat: allow pasting a unit from a course into a library
* feat: auto-generate a nice block_id when pasting into a library
* test: add test for pasting unit from course into library
* fix: better handle potentially missing display_names during paste
* chore: clarifications and import cleanups
2025-04-15 15:25:46 -07:00
Tim McCormack
bf2f8c3705 fix: Don't let local codejail exec pollute darklaunched remote globals
We were running local exec before making the copy of globals_dict for
remote_exec, so remote exec has been getting a polluted version of the
globals.
2025-04-15 15:50:12 -04:00
Tim McCormack
fd66048a49 test: Improve codejail darklaunch tests
- Separate test for misconfiguration
- Add helper method for generic dark launch testing
- Test two darklaunch scenarios: Globals interference, and error that would
  previously have caused the remote side not to run
- Rename mocks to have our usual `mock_` prefix
2025-04-15 15:50:12 -04:00
Tim McCormack
3f2271ab69 feat: Catch all exceptions from codejail dark launch
- Catch all exceptions, not just Exception, to better prevent errors from
  interfering with mainline responses.
- Introduce a separate try block around the monitoring code so that bugs
  there don't cause issues.
- Print exception information as well for both sides (but only if not a
  SafeExecException, which is redundant with emsg).

Some formatting changes to log messages as well.

Example outputs:

For `1/0`:

```
2025-04-14 17:26:34,239 INFO 10232 [xmodule.capa.safe_exec.safe_exec] [user 3] [ip 172.18.0.1] safe_exec.py:240 - Remote execution in darklaunch mode produces globals={'expect': None, 'ans': '1/0'}, emsg=None, exception=None
2025-04-14 17:26:34,239 INFO 10232 [xmodule.capa.safe_exec.safe_exec] [user 3] [ip 172.18.0.1] safe_exec.py:245 - Local execution in darklaunch mode produces globals={'expect': None, 'ans': '1/0'}, emsg='ZeroDivisionError: division by zero', exception=None
```

For `raise BaseException("hi")`:

```
2025-04-14 17:26:13,359 INFO 10232 [xmodule.capa.safe_exec.safe_exec] [user 3] [ip 172.18.0.1] safe_exec.py:240 - Remote execution in darklaunch mode produces globals={'expect': None, 'ans': 'raise BaseException("hi")'}, emsg=None, exception=None
2025-04-14 17:26:13,359 INFO 10232 [xmodule.capa.safe_exec.safe_exec] [user 3] [ip 172.18.0.1] safe_exec.py:245 - Local execution in darklaunch mode produces globals={'expect': None, 'ans': 'raise BaseException("hi")'}, emsg='hi', exception=BaseException('hi')
```

With codejail-service down, and `out = 1 + 2`:

```
2025-04-14 17:30:28,597 INFO 12484 [xmodule.capa.safe_exec.safe_exec] [user 3] [ip 172.18.0.1] safe_exec.py:241 - Remote execution in darklaunch mode produces globals={'expect': None, 'ans': 'out = 1 + 2', 'out': 3, 'cfn_return': {'input_list': [{'ok': True, 'msg': 'Output:\n3', 'grade_decimal': 1}]}}, emsg=None, exception=CodejailServiceUnavailable('Codejail API Service is unavailable. Please try again in a few minutes.')
2025-04-14 17:30:28,597 INFO 12484 [xmodule.capa.safe_exec.safe_exec] [user 3] [ip 172.18.0.1] safe_exec.py:246 - Local execution in darklaunch mode produces globals={'expect': None, 'ans': 'out = 1 + 2', 'out': 3, 'cfn_return': {'input_list': [{'ok': True, 'msg': 'Output:\n3', 'grade_decimal': 1}]}}, emsg=None, exception=None
```
2025-04-15 15:50:12 -04:00
Tim McCormack
45a96e2430 feat: Run remote codejail even if unexpected exception in local safe_exec
During dark launch of remote codejail, we want to ensure we always run both
local and remote execution -- otherwise we're missing data for the remote
side in an important situation.

This will help answer the question of whether the unexpected exception
happens on both sides, even though it may not look exactly the same due to
differences in how unexpected errors are handled.

An example input that provokes this in unsafe execution mode is
`raise BaseException("hi")`; in safe execution mode, printing to
`sys.__stdout__` should also produce an appropriate error.
2025-04-15 15:50:12 -04:00
Rômulo Penido
1047ed4d5b feat: collections support for containers [FC-0083] (#36504)
Adds support for adding Containers to Collections.
2025-04-15 13:12:51 -05:00
Arunmozhi
9f299df3a0 feat: adds scrollToXBlock message handler for cms iframe view (#36478)
This commit adds a new message handler to the XBlockContainerPage
CMS view, that allows the MFE to send a signal to the IFrame
and scroll to a specific XBlock.
2025-04-15 22:00:31 +05:30
gabrielC1409
db27ab6166 feat: Send xqueue submissions to edx-submission
fix: Restructuring to send course_id and score to edx submission

fix: Refactoring of sending information to sent_to_submission

fix: Elimination of unnecessary functions

fix: Added usage comment to ProblemBlock in XqueueInterface constructor

fix: update doc ADR

fix: setting for Quality Others test (ubuntu-24.04, 3.11, 20)

fix: Deprecation for django-trans-escape-filter-parse-error

test: Add @pytest.mark.django_db decorator to test functions

test: Fix for pylint being disabled

fix: updated changes for pylint disable

fix: update error from docs ADR-0005

update: xmodule/docs/decisions/0005-send-data-to-edx-submission.rst

Co-authored-by: Sarina Canelake <sarina@axim.org>

update: xmodule/docs/decisions/0005-send-data-to-edx-submission.rst

Co-authored-by: Sarina Canelake <sarina@axim.org>

fix: Adjusted correction

fix: update date for docs ADR

Revert "fix: update date for docs ADR"

This reverts commit 0b4229c51c4937f95cb407872645dd448df45418.

fix: replace call created_submission to create_external_grader_detail

fix: update test xqueue_submission

fix: add docstring in test_xqueue_submission

fix: update date doc ADR

fix: update version edx-submission 3.8.6

fix: add @pytest.mark.xfail

fix: add 20 chances in test_capa_block:

fix: increase retry attempts for seed generation in ProblemBlockTest

fix: change version to edx-submission lib

fix: new version edx-submission in testings

fix: replace parameter file to files

fix: update variable grader_file_name and points_possible

fix: Adjustment in the is_flag_active function to always take the last record edited in the waffle

fix: wrap large line of code

fix: update function is_flag_active

fix: code style adjustment

fix: changes for 60 retry

feat: use CourseWaffleFlag to determine xqueue callback path

fix: Code style adjustment

fix: remove deprecated xqueue callback route and simplify callback type logic

fix: Deleting a comment in the ADR document

fix: add log in self.block is None

fix: Code style adjustment in log
2025-04-15 11:59:32 -04:00
Muhammad Anas
2930214067 feat: add markdown editor waffle flag (#36512)
This PR adds contentstore.use_react_markdown_editor course waffle flag in cms.
This flag helps in enabling the markdown editor in the authoring mfe.

This PR also adds the markdown_edited field in the Problem Xblock to persist the
user's choice of switching to the markdown editor on the authoring MFE.

More details in the authoring MFE PR: openedx/frontend-app-authoring#1805
2025-04-15 11:28:19 -04:00
sarina
ec4fd59d49 docs: Update link to sql schema doc 2025-04-15 09:27:08 -04:00
Awais Qureshi
6680aecbbe Rescore problem to drf (#35627)
* feat!: upgrading api to DRF.
2025-04-15 15:24:05 +05:00
Hassan Raza
694bf77993 fix: Remove code for group new comment notification (#36501) 2025-04-15 12:21:39 +05:00
Muhammad Adeel Tajamul
ee8eeae55c feat: prevent sending course update, recurring nudge and upgrade reminder email to disabled users (#36514) 2025-04-14 18:11:01 +05:00
Hassan Raza
b14ff9ea8d fix: Update ORA notification type for grouper (#36517) 2025-04-14 15:02:25 +05:00
Navin Karkera
b893b23ce9 feat: post component height to parent window [FC-0083] (#36477)
XBlock rendered in an iframe in frontend-app-authoring needs to resize automatically based on component size.

Updates xblock iframe template to post message to parent window on size change.
2025-04-11 18:01:36 +00:00
Jillian
11bab7d2ed refactor!: use LibraryCollectionLocator and LibraryContainerLocator [FC-0083] (#36476)
efactors the content_libraries.api to use LibraryCollectionLocator and LibraryContainerLocator keys, instead of passing separate LibraryUsageKeyV2 keys along with the collection/container locators.

Renames misleading uses of collection_usage_key to collection_locator, including in the content_libraries.api and content.search.api method names and parameters.

This change impacts Developers, but should not affect end users.

This refactoring seems reasonable to do without going through deprecation, given the minimal use of these APIs.
2025-04-11 10:21:58 -05:00
Chris Chávez
dc4144ec95 feat: add restore container API, delete index when deleting container (#36464) 2025-04-10 15:15:53 -07:00
Irtaza Akram
de75c37047 fix: duplicate rendering of instructions in annotatable xblock (#36445)
In the Annotatable XBlock, the <instructions> element was appearing
twice in the student view:

* Once in "annotatable-instructions" (where it should be).
* Again in "annotatable-content" (where annotations and other content are rendered).

The _render_content method processed and rendered the entire XML
data, including <instructions>, without removing it. The
_extract_instructions method, which is responsible for removing
<instructions>, was not called in _render_content, leading to
duplication.

This fix will:

* Prevents duplicate instructions in the student view.
* Maintains the expected behavior of showing instructions only in
  "annotatable-instructions".
* No impact on existing annotation functionality.
2025-04-10 11:01:38 -04:00
Muhammad Umar Khan
b9556211be chore: fix cache content size calculation error (#36511)
Co-authored-by: M Umar Khan <umar.khan@A006-01609.local>
2025-04-10 15:22:28 +05:00
Hassan Raza
0acc44fbcd fix: Enable ORA new submissions course notification preference (#36449)
* fix: Enable ORA new submissions course notification preference

* fix: update edx-ora2 version
2025-04-10 13:32:54 +05:00
Rômulo Penido
a0d99315ad feat: container support for tags [FC-0083] (#36484)
* feat: container tag support

* fix: fixes from review

* docs: fix typo
2025-04-10 11:14:54 +05:30
Kyle McCormick
1e6b40ac9a fix: Globally Enable Studio Content REST API (#36488)
There was a waffle flag `contentstore.enable_studio_content_api`,
intended to gate the "experimental" REST APIs at
`<CMS_ROOT>/api/contentstore/v{0,1,2}/*`. In practice, these APIs are no
longer experimental: for the past few named releases, they have been
enabled in Tutor and used to power the Authoring MFE.

We are making the Authoring MFE default-on in all Open edX sites
starting in Teak, with the legacy authoring frontend slated for removal
by Ulmo. Therefore, we need to remove flag which is gating the REST API.
We are _not_ introducing a temporary opt-out toggle, as we do need feel
it is necessary.

Part of: https://github.com/openedx/edx-platform/issues/36275
2025-04-09 14:10:12 -04:00
Kyle D. McCormick
e6c24bdd0d refactor: Remove now-unused static asset Django settings
Closes: https://github.com/openedx/edx-platform/issues/36407
2025-04-09 13:38:36 -04:00
Kyle D McCormick
a8cb61dda9 fix: Remove Two Pointless Contentstore Waffle Flags
These flags had no effect, so they are being removed:

* new_core_editors.use_advanced_problem_editor
* new_editors.add_game_block_button

Related to: https://github.com/openedx/frontend-app-authoring/pull/1753
Part of: https://github.com/openedx/edx-platform/issues/26275
2025-04-09 13:38:36 -04:00
Feanil Patel
488891c5ca Merge pull request #36436 from openedx/feanil/remove_courseware_sock
feat!: Remove the course sock and related APIs.
2025-04-09 10:14:09 -04:00
Feanil Patel
9a9f0ecba0 Merge pull request #36493 from openedx/feanil/fix_a_graph
docs: Make the graph render correctly.
2025-04-09 09:36:35 -04:00
Muhammad Adeel Tajamul
27d03cb906 feat: prevent sending goal reminder email to disabled users (#36505) 2025-04-09 16:29:44 +05:00
Hassan Raza
40c82c2ff4 feat: Group ora staff notifications (#36440)
* feat: Group ora staff notifications

* fix: Revert default change for ora staff notifications

* fix: update edx-ora2 version
2025-04-09 14:34:07 +05:00
Kyle McCormick
0120179531 build: Switch off deprecated C-Hive NPM cache (#36502)
JS tests are failing because we are using a discontinued GHA caching service:
https://github.blog/changelog/2025-03-20-notification-of-upcoming-breaking-changes-in-github-actions/#decommissioned-cache-service-brownouts

This service is used by the unsupported C-Hive caching action which we are
relying on: https://github.com/c-hive/gha-npm-cache

We are switching to the supported caching mechanims which is provided by
setup-node:
https://github.com/actions/setup-node?tab=readme-ov-file#caching-global-packages-data
2025-04-08 13:00:56 -04:00
Muhammad Adeel Tajamul
7cb3196a1a feat: prevent sending notification digest email to disabled users (#36498) 2025-04-08 11:24:26 +05:00
Feanil Patel
dd0797fcfd docs: Make the graph render correctly.
I'm not sure how this worked before but I corrected to use the
`graphviz` directive and then full graphviz graph syntax which seemed to
fix whatever issues it was having.
2025-04-07 14:54:50 -04:00
Tim McCormack
6c638572a7 test: Delete flaky test test_rate_limiting_registration_view (#36491)
Deleted out of `RegistrationViewTestV1` although the failure was observed
in `RegistrationViewTestV2` which inherits from it.

Deleted according to flaky test process:
https://openedx.atlassian.net/wiki/spaces/AC/pages/4306337795/Flaky+Test+Process

Flaky test ticket:
- https://github.com/openedx/edx-platform/issues/36490
2025-04-07 14:52:39 -04:00
github-actions[bot]
25ec03ccbd feat: Upgrade Python dependency edx-enterprise (#36492)
chore: upgrade edx-enterprise to 5.12.3

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

Co-authored-by: bcitro <67378070+bcitro@users.noreply.github.com>
2025-04-07 14:39:32 -04:00
sarina
27848143c1 docs: Update refs to docs.edx.org 2025-04-07 11:33:49 -04:00
Feanil Patel
1829eb7d71 feat!: Remove the course sock and related APIs.
DEPR: https://github.com/openedx/edx-platform/issues/36429

This change removes the course_sock and related API data.  The UI it
removes is on the Legacy Courseware pages which have also been replaced
and have their own [deprecation ticket](https://github.com/openedx/edx-platform/issues/35803)

Before this can be merged, we will need to update the
frontend-app-learning MFE to no longer consume the
`can_show_upgrade_sock` attribute.

BREAKING CHANGE: CourseHomeMetadata, ProgressTab, OutlineTab and
VerifiedMode APIs will no longer have a `can_show_upgrade_sock`
attribute.
2025-04-07 10:29:39 -04:00
Jillian
94468ef4b3 Finishes refactoring libraries APIs [FC-0083] (#36468)
Addresses libraries API TODOs introduced by https://github.com/openedx/edx-platform/pull/36371
2025-04-07 14:17:04 +00:00