654 Commits

Author SHA1 Message Date
Rodrigo Mendez
12a46e6463 feat: AuthZ for course authoring compatibility layer (#38013) 2026-03-06 09:35:17 -07:00
Feanil Patel
00f72bb41e Merge pull request #37504 from Pearson-Advance/felipeb/learning-microfrontend-url-site-aware
feat: make LEARNING_MICROFRONTEND_URL site aware.
2025-12-23 10:58:34 -05:00
Feanil Patel
02c1530b48 Merge pull request #37547 from open-craft/agrendalath/start-date-masquerade
feat: add Waffle flag to control start date access for masquerading users
2025-11-20 10:29:15 -05:00
Felipe Bermúdez-Mendoza
6b821a6a5f chore: address comments by Feanil and fix pycodestyle. 2025-11-07 07:38:21 +01:00
Felipe Bermúdez-Mendoza
7c42a600da feat: make LEARNING_MICROFRONTEND_URL site aware. 2025-11-07 07:38:21 +01:00
Tarun Tak
18d5abb2f6 chore: Replace pytz with zoneinfo for UTC handling - Part 1 (#37523)
First PR to replace pytz with zoneinfo for UTC handling across codebase.

This PR migrates all UTC timezone handling from pytz to Python’s standard
library zoneinfo. The pytz library is now deprecated, and its documentation
recommends using zoneinfo for all new code. This update modernizes our
codebase, removes legacy pytz usage, and ensures compatibility with
current best practices for timezone management in Python 3.9+. No functional
changes to timezone logic - just a direct replacement for UTC handling.

https://github.com/openedx/edx-platform/issues/33980
2025-10-28 16:23:22 -04:00
Agrendalath
890b8268c9 feat: add Waffle flag to control start date access for masquerading users
This introduces the `ENFORCE_MASQUERADE_START_DATES` flag.
When the flag is disabled (default), masquerading users bypass start dates.
When the flag is enabled, masquerading users see the same start date
restrictions as regular students.
2025-10-28 13:46:05 +01:00
Edward Zarecor
ed2e77ed82 Merge pull request #36499 from raccoongang/feat/api-for-shifting-all-past-due-dates
feat: api for shifting all relative past due dates
2025-10-08 12:01:44 -04:00
Kyrylo Kholodenko
56806007ac refactor: use path instead of re_path 2025-10-06 13:08:39 +03:00
Kyrylo Kholodenko
3c31cdb9eb refactor: rename and refactor functions and view 2025-10-03 14:43:34 +03:00
Agrendalath
bbc0cc2baa fix: show correct icons in the sidebar for units with custom XBlocks
Currently, the sidebar relies only on the XBlock's `category` class attribute
(called `type` in the transformers). This behavior is inconsistent with the
legacy subsection navigation, which relies on the `XModuleMixin.get_icon_class`
method. This commit adds the `icon_class` to the fields collected by the
transformers and uses it to determine whether the "problem" or "video" icon
should be displayed for a unit in the sidebar.
2025-08-21 00:29:01 +05:30
Ivan Niedielnitsev
6c45c3ab93 Merge branch 'master' into feat/api-for-shifting-all-past-due-dates 2025-08-11 11:19:01 +03:00
Feanil Patel
2fc068220d style: Fix various linting issues. 2025-08-07 15:35:04 -04:00
Feanil Patel
3334325ff9 fix: Drop _get_legacy_courseware_url and related usage.
We were running some tests using this function but it is not actually
used in the running application anymore so drop those tests and remove
the function in preparation for removing the legacy courseware itself.
2025-08-07 15:35:04 -04:00
Nathan Sprenkle
02c45c5325 refactor: load learning mfe ports from env (#37082) 2025-07-30 11:59:26 -04:00
Kyrylo Kholodenko
fd5fc29dd6 feat: api for shifting all relative past due dates 2025-05-21 19:32:04 +03:00
Feanil Patel
88c7cd7bf3 feat!: Remove Legacy Preview Functionality (#36460)
* feat!: Remove all trivial mentions of PREVIEW_LMS_BASE

There are a few more mentions but these are all the ones that don't need
major further followup.

BREAKING CHANGE: The learning MFE now supports preview functionality
natively and it is no longer necessary to use a different domain on the
LMS to render a preview of course content.

See https://github.com/openedx/frontend-app-learning/issues/1455 for
more details.

* feat: Drop the `in_preview_mode` function.

Since we're no longer using a separate domain, that check always
returned false.  Remove it and update any places/tests where it is used.

* feat: Drop courseware_mfe_is_active function.

With the removal of the preview check this function is also a no-op now
so drop calls to it and update the places where it is called to not
change other behavior.

* feat!: Drop redirect to preview from the legacy courseware index.

The CoursewareIndex view is going to be removed eventually but for now
we're focusing on removing the PREVIEW_LMS_BASE setting.  With this
change, if someone tries to load the legacy courseware URL from the
preview domain it will no longer redirect them to the MFE preview.

This is not a problem that will occur for users coming from existing
studio links because those links have already been updated to go
directly to the new urls.

The only way this path could execute is if someone goes directly to the
old Preview URL that they saved off platform somewhere.  eg. If they
bookmarked it for some reason.

BREAKING CHANGE: Saved links (including bookmarks) to the legacy preview
URLs will no longer redirect to the MFE preview URLs.

* test: Drop the set_preview_mode test helper.

This test helper was setting the preview mode for tests by changing the
hostname that was set while tests were running.  This was mostly not
being used to test preview but to run a bunch of legacy courseware tests
while defaulting to the new learning MFE for the courseware.

This commit updates various tests in the `courseware` app to not rely on
the fact that we're in preview to test legacy courseware behavior and
instead directly patches either the `_redirect_to_learning_mfe` function
or uses the `_get_legacy_courseware_url` or both to be able to have the
tests continue to test the legacy coursewary.

This will hopefully make the tests more accuarte even though hopefully
we'll just be removing many of them soon as a part of the legacy
courseware cleanup.

We're just doing the preview removal separately to reduce the number of
things that are changing at once.

* test: Drop the `_get_urls_function`

With the other recent cleanup, this function is no longer being
referenced by anything so we can just drop it.

* test: Test student access to unpublihsed content.

Ensure that students can't get access to unpublished content.
2025-05-14 08:59:11 -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
Feanil Patel
d423775012 test: Replace calls to reverse('courseware')
We want to remove this page and URL endpoint so we're removing all the
references in the code that might point to this page.  It was replaced
by the sequences page in the Learning MFE years ago but the old pages
were never cleaned up. We are replacing the calls with the URL for the
courseware in the learning MFE.

See https://github.com/openedx/edx-platform/issues/35803 for more
details.
2025-04-04 14:01:19 -04:00
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
Kristin Aoki
ac365d88f1 fix: jump_to url not working for tutor (#35805)
* fix: jump_to url not working for tutor

* fix: failing test and pylint
2024-11-07 13:18:04 -05:00
Kristin Aoki
e13d66d1e4 feat: support unit preview in learning MFE (#35747)
* feat: update preview url to direct to mfe

* fix: use url builder instead of string formatter

* fix: url redirect for never published units

* fix: remove 404 error when  not a preview or staff

* feat: update sequence metadata to allow draft branch
2024-11-01 11:03:06 -04:00
Kristin Aoki
afd1394112 Revert "feat: update preview url to direct to mfe (#35687)" (#35732)
This reverts commit 2373dd02f9.
2024-10-28 17:26:29 +00:00
Kristin Aoki
2373dd02f9 feat: update preview url to direct to mfe (#35687)
* feat: update preview url to direct to mfe

* fix: use url builder instead of string formatter

* fix: url redirect for never published units
2024-10-28 10:31:53 -04:00
Fatima Sohail
af69cbe671 feat: waffle flag based switch to ses for goal reminder email (#35615)
* feat: waffle based switch to ses for goal reminder email

* test: added test cases for ace message parameters

* feat: updated logic to specify channel name

* chore: update edx-ace version
2024-10-14 19:20:02 +05:00
Daniel Valenzuela
b98cbd4c2c feat: warn when relative dates are past due and can't be shifted 2024-06-10 22:55:16 +02:00
Feanil Patel
9bd4474f7d test: Reduce query counts now that we dropped django-splash. 2024-04-18 12:43:33 -04:00
Bryann Valderrama
4c0fba2063 feat: expose hide_from_toc field for course blocks in outline API (#33955)
These changes are part of the effort made to implement https://openedx.atlassian.net/wiki/spaces/OEPM/pages/3853975595/Feature+Enhancement+Proposal+Hide+Sections+from+course+outline
2024-02-15 10:44:28 -04:00
ayesha waris
2fd1f7bd90 chore: removed enable_course_live and enable_big_blue_button flag flags (#33998)
* chore: removed enable_course_live flag

* chore: removed enable_big_blue_button flag

* fix: fixing failed test cases
2024-01-12 15:24:46 +05:00
Feanil Patel
64e91d4080 test: Update to an even longer password. 2023-10-12 10:31:13 -04:00
Feanil Patel
1e2ea85372 test: Update more tests that had short passwords. 2023-10-10 16:36:26 -04:00
Usama Sadiq
852246db8c fix: replace ugettext with gettext (#33022) 2023-08-16 17:07:23 +05:00
Syed Ali Abbas Zaidi
8480dbc228 chore: apply amnesty on existing not fixable issues (#32215)
* fix: eslint operator-linebreak issue

* fix: eslint quotes issue

* fix: react jsx indent and props issues

* fix: eslint trailing spaces issues

* fix: eslint line around directives issue

* fix: eslint semi rule

* fix: eslint newline per chain rule

* fix: eslint space infix ops rule

* fix: eslint space-in-parens issue

* fix: eslint space before function paren issue

* fix: eslint space before blocks issue

* fix: eslint arrow body style issue

* fix: eslint dot-location issue

* fix: eslint quotes issue

* fix: eslint quote props issue

* fix: eslint operator assignment issue

* fix: eslint new line after import issue

* fix: indent issues

* fix: operator assignment issue

* fix: all autofixable eslint issues

* fix: all react related fixable issues

* fix: autofixable eslint issues

* chore: remove all template literals

* fix: remaining autofixable issues

* chore: apply amnesty on all existing issues

* fix: failing xss-lint issues

* refactor: apply amnesty on remaining issues

* refactor: apply amnesty on new issues

* fix: remove file level suppressions

* refactor: apply amnesty on new issues
2023-08-07 19:13:19 +05:00
Agrendalath
6825088801 Revert "Revert "feat: remove field-data binding from the runtime [FC-0026]" (#32740)"
This reverts commit fa06be106e.
2023-07-19 15:36:26 +02:00
Piotr Surowiec
fa06be106e Revert "feat: remove field-data binding from the runtime [FC-0026]" (#32740)
* Revert "feat: remove `field-data` service from runtime initialization"

This reverts commit 6c435bb68c.

* Revert "feat: remove field data binding from the runtime"

This reverts commit 5f46ea52cd.
2023-07-13 13:04:02 -04:00
Agrendalath
5f46ea52cd feat: remove field data binding from the runtime 2023-06-26 19:21:22 +02:00
IrfanUddinAhmad
b2734099ac feat: Added filter for modifying course home url for externally hosted courses 2023-05-26 14:15:27 +05:00
Syed Ali Abbas Zaidi
d7053a6783 fix: eslint autofixable issues (#32181)
* fix: eslint operator-linebreak issue

* fix: eslint quotes issue

* fix: react jsx indent and props issues

* fix: eslint trailing spaces issues

* fix: eslint line around directives issue

* fix: eslint semi rule

* fix: eslint newline per chain rule

* fix: eslint space infix ops rule

* fix: eslint space-in-parens issue

* fix: eslint space before function paren issue

* fix: eslint space before blocks issue

* fix: eslint arrow body style issue

* fix: eslint dot-location issue

* fix: eslint quotes issue

* fix: eslint quote props issue

* fix: eslint operator assignment issue

* fix: eslint new line after import issue

* fix: indent issues

* fix: operator assignment issue

* fix: all autofixable eslint issues

* fix: all react related fixable issues

* fix: autofixable eslint issues

* chore: remove all template literals

* fix: remaining autofixable issues

* fix: failing js test
2023-05-18 11:03:59 +05:00
Gabe Mulley
1fa50b834d feat: pass query string parameters on to the learning MFE for jump_to links (#32180) 2023-05-16 08:32:56 -04:00
Muhammad Adeel Tajamul
d8db64cf2a feat: hide discussion tab when disabled (#32195) 2023-05-16 05:17:06 +05:00
Agrendalath
b91f858e70 feat: add Waffle Flag to disable resetting self-paced deadlines by learners 2023-05-04 17:20:44 +02:00
Syed Ali Abbas Zaidi
f1fb38ed83 fix: multi lines and spaces issues (#31885)
* fix: multi lines and spaces issues

* fix: eslint operator-linebreak issue

* fix: eslint quotes issue

* fix: remaining quotes issues

* fix: eslint object curly newline issue

* fix: eslint object curly spacing issue

* fix: eslint brace-style issues

* fix: react jsx indent and props issues

* fix: eslint trailing spaces issues

* fix: eslint linbreak style issue

* fix: eslint space unary operator issue

* fix: eslint line around directives issue

* fix: void and typeof space unary ops issue
2023-05-03 12:22:46 +05:00
Agrendalath
aa85257b19 fix: use student-specific anonymous IDs in CAPA and HTML XBlocks
After changes from #31472, the user service of a "leaf" XBlock gets overridden
with the one created for its parent (SequenceBlock). Therefore, the
`requires_per_student_anonymous_id` is ignored in these XBlocks. The
subsequent renders of an XBlock (e.g., when requesting the solution) use
the student-specific IDs.

This removes choosing the proper ID (course-specific or student-specific) from
the runtime initialization. Instead, both IDs are passed to the user service.

There are only two XBlocks that relied on the
`requires_per_student_anonymous_id` - `ProblemBlock` and `HtmlBlock`. They
now request the "deprecated" (student-specific) user ID directly from the user
service.
2023-05-02 17:58:22 +02:00
Syed Ali Abbas Zaidi
5549db4d80 fix: migrate remaining eslint-config-edx (#31760)
* fix: migrate remaining eslint-config-edx

* refactor: updated eslint rules according to eslint-config-edx-es5

* refactor: add custom rules to suppress unnecessary eslint issues

* refactor: add custom rules to internal eslint configs

* fix: fix all indentation issues

* chore: update lock file
2023-03-02 16:16:50 +05:00
0x29a
3a1011bed8 refactor: replace usages of XModuleMixin.system with XBlock.runtime 2023-01-30 18:15:24 +01:00
0x29a
c3f672a399 refactor: rename module -> block within remaining openedx/features 2023-01-30 18:15:22 +01:00
0x29a
9d8375ff99 refactor: rename module -> block within lms/djangoapps/courseware
Also, removed unused `_has_access_xmodule` methid from `lms/djangoapps/courseware/access.py`.
2023-01-30 18:15:22 +01:00
Arunmozhi
d417a7561f refactor: rename ItemFactory to BlockFactory 2023-01-23 14:47:47 +01:00
Sagirov Eugeniy
8f88422c4a test: prepare tests for removing support for children in Old Mongo 2022-10-28 11:43:20 -04:00
Sarina Canelake
4a2f231302 fix: fix github url strings (org edx -> openedx) 2022-09-15 14:52:28 -04:00