Commit Graph

25379 Commits

Author SHA1 Message Date
ayesha waris
9750c63f74 temp: adding console statements for testing purpose (#36733)
Co-authored-by: Ayesha Waris <ayesha.waris@192.168.10.31>
2025-05-16 21:55:27 +05:00
Daniel Wong
a80523b936 fix: refactor index_together to indexes for Django 5.2 support 2025-05-15 08:52:15 -06:00
Usama Sadiq
cf372c20ae fix: refactor index_together to indexes for Django 5.2 support (IV) (#36716)
* fix: refactor index_together to indexes for Django 5.2 support

* fix: fix quality issues
2025-05-15 09:41:55 +05: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
Usama Sadiq
db49b2d0a3 fix: refactor index_together to indexes for Django 5.2 support (#36708) 2025-05-14 09:16:23 +05:00
Usama Sadiq
af5faf4965 fix: refactor index_together to indexes for Django 5.2 support (#36702) 2025-05-13 11:06:34 +05:00
Justin Hynes
f509bceac2 fix: setup context for emitting event to segment if desired (#36692)
If we wish this event to be sent to Segment through the event-tracking lib, we must ensure that the context includes at least the `user_id` field in the context dict.
2025-05-09 10:54:37 -04:00
Eemaan Amir
841efcc9fb feat: update user segment attribute is_disabled when user is disabled/enabled (#36681) 2025-05-09 19:35:16 +05:00
Taimoor Ahmed
1bed70b73e feat!: remove cs_comments_service support for forums pin API
This will force the use of the new v2 forums API for pinning/unpinning.
2025-05-07 10:41:37 -04:00
Tim McCormack
4c15e00611 docs: Improve docs for HIBP settings; remove duplicated cms copies (#34116)
- Clarify effects of enabling each policy.
- Document the thresholds and what policies they relate to.
- Express thresholds as floating point numbers to better hint at them not
  being intended as integer values.
- Change toggle use case from temporary to open_edx for login policies (as
  we're expecting to keep those toggles long term, as an optional feature).
- Remove links to private Jira tickets. (openedx Jira is now gone, and
  these tickets are only present in 2U's private Atlassian instance.)
- Import LMS HIBP settings into CMS (rather than duplicating them) but
  mark as unused.
2025-05-05 19:16:37 -04:00
Justin Hynes
46c9b3a193 fix: add error handling for potential issues calculating course progress (#36660)
* fix: add error handling for potential issues calculating course progress

Realized there is potential in a few places for exceptions to be thrown. I'm adding some more error handling in the course progress task and function to handle potential issues.
2025-05-05 14:00:12 -04:00
vladislavkeblysh
84583a73e0 feat: [RGOeX-26106] added correct image for FB sharing (#33784) 2025-05-02 11:58:21 -04:00
Justin Hynes
919615635e feat: optionally emit course completion analytics when a learner enters the courseware (#36507)
This PR attempts to improve the ability to collect analytics about learner's progress
in their courses. Currently, the only place we regularly calculate course progress is
when a learner visits the "Progress" tab in the courseware.

Now, _optionally_, when a learner visits the home page of their course, we will enqueue
a Celery task that will calculate their progress and emit a tracking event.

This event is gated by use of the COURSE_HOME_SEND_COURSE_PROGRESS_ANALYTICS_FOR_STUDENT
waffle flag.
2025-04-29 13:46:09 -04:00
Muhammad Adeel Tajamul
47a920d5b9 feat: added a policy to prevent sending ace messages to disabled users (#36584) 2025-04-29 11:29:33 +05:00
Maxim Beder
36bd075c9a feat: update certificate icon
Old certificates icon contained edX trademark logo, which was not
suitable for the open source repos. Replaced with the icon that contains
Open edX logo.
2025-04-25 11:57:14 -04:00
Awais Qureshi
1b15ae0cd9 feat!: upgrading api to DRF. 2025-04-24 13:00:04 +05:00
Awais Qureshi
04aa93c213 feat!: upgrading api to DRF. 2025-04-24 11:29:34 +05:00
Muhammad Faraz Maqsood
692a1862d0 fix: message after email is sent via batch enrollment 2025-04-24 10:46:50 +05:00
Kyle D McCormick
4551aea70d feat: Install (sub)sections apps from openedx-learning 2025-04-22 18:51:34 -04:00
Edward Zarecor
49a69f5042 feat: allow return dates for not started courses for mobile, PR #36297
feat: allow return dates for not started courses for mobile
2025-04-22 13:28:38 -04:00
Muhammad Adeel Tajamul
6972a6a562 feat: prevent sending bulk email to disabled users (#36549) 2025-04-22 12:44:04 +05:00
Kyrylo Kholodenko
b2c57adf12 feat: allow return dates for not started courses for mobile 2025-04-18 14:08:35 +03: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
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
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
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
Muhammad Adeel Tajamul
27d03cb906 feat: prevent sending goal reminder email to disabled users (#36505) 2025-04-09 16:29:44 +05: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
Taimoor Ahmed
0595e5a57d fix: legacy forum issues (#36470)
Co-authored-by: Taimoor  Ahmed <taimoor.ahmed@A006-01434.local>
2025-04-07 19:04:14 +05:00
Feanil Patel
cdf26039e6 test: Remove reference to the courseware url.
The courseware URL is going away but it's just used here to test the
middleware.  That can be test with other urls that are relevant to this
middleware.

Note, I was unable to re-produce the failures so I've put back using the
standard `reverse` logic for fetching the URL in the test.
2025-04-04 14:01:19 -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
Justin Hynes
52f2231f20 fix: make the issued date displayed on previewed certificates match real certificates (#36471)
* fix: make the issued date displayed on previewed certificates match real certificates

This PR fixes an inconsistency in the dates displayed on certificates previewed via Studio with "real" certificates rendered to users.
2025-04-03 13:43:51 -04:00
Feanil Patel
e3c5495537 Merge branch 'master' into jciasenza 2025-04-03 09:14:56 -04:00
sarina
1e3074a3f9 docs: Update edx.rtd.io links to docs.openedx.org 2025-04-02 12:10:56 -04:00
Justin Hynes
61879b8caf fix: ensure we are selecting the correct date for self-paced courses (#36465)
It is possible for self-paced courses to be configured with a display behavior of "END" even though this configuration option should be invalid. The fix to this problem is beyond the scope of this PR. However, we can ensure we are selecting the correct display date for the certificate with a little bit of defensive coding.

I've added a check to ensure that we only use the end date of the course when the course is instructor-paced and configured with a display behavior of "END".
2025-04-02 11:19:59 -04:00
Ihor Romaniuk
f5c17bb88c feat: [FC-0070] add events and style for rendering Split xblock in chromeless template (#35813)
This feature introduces functionalities to improve XBlock interactions within iframes:

  * Add styles that adopt default styles for Split Test which renders chromless template via iframe in MFE Authoring.
  * When the isIframeEmbed option is enabled, the XBlock sends a postMessage to the parent window. When sending such a message, the standard link transition is cancelled and the transition is carried out in MFE Authoring.
2025-03-31 18:31:59 -03:00
jciasenza
bae47af758 fix: updated existing enzyme tests to use react testing library 2025-03-28 17:45:48 -03:00
Braden MacDonald
1ca57ec129 Basic CRUD REST Endpoints for units in content libraries [FC-0083] (#36371)
* refactor: convert libraries API from attr.s to dataclass, fix types

* fix: make corresponding updates to 'search' code

* feat: use new version of openedx-learning with containers support

* temp: Use opencraft branch of opaquekeys

* refactor: Use LibraryElementKey instead of LibraryCollectionKey

* refactor: split libraries API & REST API up into smaller modules

* feat: new REST API for units in content libraries

* feat: python+REST API to get a unit

* feat: auto-generate slug/key/ID from title of units

* feat: generate search index documents for containers

* refactor: rename LibraryElementKey to LibraryItemKey

* fix: lint error

* feat: adds new units to search index on create/update

and when running reindex_studio.

Updates requirements for openedx-events and openedx-learning to support
these changes.

* fix: pylint

* fix: temp requirement

* fix: search index container events/tasks

* feat: add get_library_container_usage_key to libraries API

and use it when search indexing containers

* fix: index all containers during reindex_studio

* chore: bump openedx-events requirement

* fix: address review comments

* chore: bumps openedx-learning to 0.19.1

* fix: rename api method to library_container_locator

since container keys are locators, not usage keys

* chore: bumps opaque-keys dependency

* test: fix misnamed unit_usage_key

* feat: adds APIs to update or delete a container (#757)

* feat: adds python and REST APIs to update a container's display_name
* refactor: adds _get_container method to api to reduce code duplication
* feat: adds python and REST APIs to delete a container
* test: add container permission tests

---------

Co-authored-by: XnpioChV <xnpiochv@gmail.com>
Co-authored-by: Jillian Vogel <jill@opencraft.com>
Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
2025-03-28 18:55:04 +05:30
Muhammad Umar Khan
c6f75dfd2e chore: use pickle to compute collected_blocksture size before cacheing (#36455)
Co-authored-by: M Umar Khan <umar.khan@A006-01609.local>
2025-03-27 21:01:25 +05:00
Justin Hynes
f99b89c8c5 feat: update date selection logic when rendering course certs (#36447)
Fixes: https://github.com/openedx/platform-roadmap/issues/423

This PR updates the logic for determining the issued date shown on course certificates. For courses with a display behavior set to 'end date of the course', certificates earned by learners will now show the course run’s end date as the issued date.
2025-03-27 08:41:38 -04:00
Muhammad Umar Khan
9f5500a7f4 chore: use zpickle to compute collected_blocksture size before cacheing (#36452)
Co-authored-by: M Umar Khan <umar.khan@A006-01609.local>
2025-03-27 13:30:03 +05:00
Muhammad Faraz Maqsood
9706caed6a chore: remove braze client settings from edx-platform 2025-03-26 11:21:56 +05:00
Muhammad Faraz Maqsood
591008280f chore: rename braze_client to email_client 2025-03-26 11:21:56 +05:00
Muhammad Faraz Maqsood
2b83fe3bf4 Revert "chore: rename braze_client to email_client"
This reverts commit b3f9903a4b.
2025-03-25 17:38:32 +05:00
Muhammad Faraz Maqsood
fc1b608f17 Revert "chore: remove braze client settings from edx-platform"
This reverts commit d1318836ab.
2025-03-25 17:38:32 +05:00
Muhammad Faraz Maqsood
d1318836ab chore: remove braze client settings from edx-platform 2025-03-25 10:31:32 +05:00
Muhammad Faraz Maqsood
b3f9903a4b chore: rename braze_client to email_client 2025-03-25 10:31:32 +05:00
Deborah Kaplan
3136134be8 chore: move the program dashboard APIs (#36420)
Moves the Program Dashboard APIs out of the deprecated remnants of the legacy learner dashboard, into the Programs djangoapp.

Keeps the old legacy routes for this API, left over from the deprecated remnants of the legacy learner dashboard, alongside future-proofed routes which will work when the deprecated, legacy Program Dashboard is eventually replaced with functionality in the Learner Dashboard MFE.

FIXES: APER-3949
2025-03-24 12:06:52 -04:00
Muhammad Umar Khan
43493c79ca chore: add monitoring on collected_blockstructure_size (#36435)
Co-authored-by: M Umar Khan <umar.khan@A006-01609.local>
2025-03-24 17:01:04 +05:00