Commit Graph

4617 Commits

Author SHA1 Message Date
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
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
Kyrylo Kholodenko
b2c57adf12 feat: allow return dates for not started courses for mobile 2025-04-18 14:08:35 +03: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
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
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
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
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 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
Hina Khadim
ee7fd497a7 fix: add target='_blank' for videos hosted outside edx (#36361) 2025-03-17 11:10:49 +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
Usama Sadiq
1a16073ad0 fix: enable pylint warnings (#36196) 2025-02-03 14:18:11 +05:00
Deborah Kaplan
e7771d6526 fix: catch a possible exception in beta course configuration (#36172)
* fix: catch a possible exception in beta course configuration

when the learner is a beta tester, and the beta test has been set up with a large duration, the courseware djangoapp can return an overflow error on a timedelta call. In those circumstances, this defaults to returning an unmodified date.

FIXES: APER-3848
2025-01-27 13:59:02 -05:00
Marcos
67a56c270f chore: Moved jwt file to openedx.core.lib 2025-01-23 15:55:58 -03:00
Marcos
ca3cd45a79 chore: fix tests 2025-01-23 15:55:58 -03:00
Marcos
3bbf8aca7f chore: Run make compile-requirements to update dependencies 2025-01-23 15:55:58 -03:00
Marcos
3bcbcaac2d chore: Removed unused dependency 2025-01-23 15:55:58 -03:00
Marcos
825931a9b4 chore: Removed edx-token-utils dep and moved necessary logic to the repo 2025-01-23 15:55:58 -03:00
David Ormsbee
c762c1f695 perf: update edx-when to 2.5.1 for performance fix
This addresses an issue where get_schedule_for_user was making an
excessive number of calls to the database.
2025-01-22 10:50:04 -05:00
Muhammad Anas
5f302a3ae7 fix: date label for instructor paced courses 2025-01-14 18:30:16 +05:00
Muhammad Farhan Khan
f9126bfdd9 Add Django settings flags to roll out the extracted XBlocks (#35549)
chore: Add Django settings flags to roll out the extracted XBlocks
2024-12-02 20:38:40 +05:00
Alison Langston
139b4167b3 feat: update logic for courseware search enabled endpoint (#35922) 2024-11-25 10:44:49 -05:00
Feanil Patel
b2a4066bce feat!: Remove the import command from the lms.
This used to be a symlink that then turned into a copy of the same
command that exists in the contentstore in the CMS.  That command is the
correct one to use, this one is going to be removed to reduce confusion.

BREAKING CHANGE: The `python manage.py lms import` command will no
longer work.  Use the `python manage.py cms import` command instead.
2024-11-14 11:20:23 -05:00
Brian Mesick
767e1a2c07 Merge pull request #35779 from openedx/bmtcril/pii_safelist_update
chore: Add missing PII annotations, update safelist
2024-11-06 16:27:09 +00:00
Brian Mesick
e478975105 chore: Add missing PII annotations, update safelist
PII Annotations are very out of date, this commit adds most that were
missing in edx-platform, and some additional annotations to the
safelist. It is not comprehensive, several other upstream Open edX
packages also need to be updated. It also does not include removing
annotations that have been moved upstream, or been removed entirely.
Those are separate follow-on tasks.
2024-11-05 12:58:36 -05:00
Feanil Patel
db266e25f7 test: Update query counts.
With the new block_structure model cache enabled by default, we're donig
queries to it as a part of other tests.
2024-11-05 10:44:16 -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
Alison Langston
338a0a1166 feat: check course start date for courseware search (#35740) 2024-10-30 08:52:43 -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
Régis Behmo
bf862d89e7 feat!: hide courses in /courses based on catalog visibility
Previously, courses were always displayed on the LMS /courses page,
independently of their catalog visibility attribute. This meant that
even with visibility="none" courses were being displayed. This was very
counter-intuitive.

With this change, courses are displayed only when their visibility is
set to "both".

This change is flagged as breaking because it has the potential to
affect course catalogs in existing platforms.

To test this change, go to http(s)://LMS/courses as an anonymous user.
Pick a visible course and go to its "advanced settings" in the studio.
Set "Course visibility in catalog" to "about" or "none". Then, clear the
cache with the following command:

    ./manage.py lms shell -c "from django.core.cache import cache; cache.clear()"

Open the /courses page again: the course should no longer be visible.

Close https://github.com/openedx/wg-build-test-release/issues/330
2024-10-16 10:03:46 -04:00
Kyle McCormick
2bbd8ecd18 feat!: Remove outdated Libraries Relaunch cruft (#35644)
The V2 libraries project had a few past iterations which were never
launched. This commit cleans up pieces from those which we don't need
for the real Libraries Relaunch MVP in Sumac:

* Remove ENABLE_LIBRARY_AUTHORING_MICROFRONTEND,
  LIBRARY_AUTHORING_FRONTEND_URL, and
  REDIRECT_TO_LIBRARY_AUTHORING_MICROFRONTEND, all of which are obsolete
  now that library authoring has been merged into
  https://github.com/openedx/frontend-app-authoring.
  More details on the new Content Libraries configuration settings are
  here: https://github.com/openedx/frontend-app-authoring/issues/1334

* Remove dangling support for syncing V2 (learning core-backed) library
  content using the LibraryContentBlock. This code was all based on an
  older understanding of V2 Content Libraries, where the libraries were
  smaller and versioned as a whole rather then versioned by-item.
  Reference to V2 libraries will be done on a per-block basis using
  the upstream/downstream system, described here:
  https://github.com/openedx/edx-platform/blob/master/docs/decisions/0020-upstream-downstream.rst
  It's important that we remove this support now so that OLX course
  authors don't stuble upon it and use it, which would be buggy and
  complicate future migrations.

* Remove the "mode" parameter from LibraryContentBlock. The only
  supported mode was and is "random". We will not be adding any further
  modes. Going forward for V2, we will have an ItemBank block for
  randomizing items (regardless of source), which can be synthesized
  with upstream referenced as described above. Existing
  LibraryContentBlocks will be migrated.

* Finally, some renamings:

  * LibraryContentBlock -> LegacyLibraryContentBlock
  * LibraryToolsService -> LegacyLibraryToolsService
  * LibrarySummary -> LegacyLibrarySummary

  Module names and the old OLX tag (library_content) are unchanged.

Closes: https://github.com/openedx/frontend-app-authoring/issues/1115
2024-10-15 11:32:01 -04:00
Paulo Viadanna
31a3c44a73 fix: remove 'toggle_status: unsupported' from COURSES_INVITE_ONLY (#35572) 2024-10-03 21:34:25 +05:30
Kristin Aoki
acd8d467e8 feat: update ora settings course app for clarity (#35550) 2024-10-01 16:46:30 +00:00
Mohammad Ahtasham ul Hassan
6a63cfcaa4 feat: add override option to upgrade CTA utils and add course_run_key identifier (#35441)
* feat: add override option to upgrade CTAs and send course_run_key identifier
2024-09-16 13:15:51 +05:00
bydawen
483315cfe2 feat: course about page markup and styles improvements (#33712)
* feat: course about page markup and styles improvements

* test: update tests according to changes

* fix: relocate course organization and return removed prerequisites info

---------

Co-authored-by: Eugene Dyudyunov <evgen.dyudyunov@raccoongang.com>
Co-authored-by: ihor-romaniuk <ihor.romaniuk@raccoongang.com>
2024-09-09 15:08:53 +05:30
Kristin Aoki
92c8949af5 feat: add studio_access attribute to metadata (#35444)
* feat: add studio_access attribute to metadata

* fix: styling errors

* fix: remove redunant return
2024-09-06 19:16:44 +00:00
Kyrylo Kireiev
53174178f3 feat: [FC-0047] Extend mobile API with course progress and primary courses on dashboard view (#34848)
* feat: [AXM-24] Update structure for course enrollments API (#2515)
---------
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>

* feat: [AXM-53] add assertions for primary course (#2522)
---------
Co-authored-by: monteri <36768631+monteri@users.noreply.github.com>

* feat: [AXM-297] Add progress to assignments in BlocksInfoInCourseView API (#2546)
---------
Co-authored-by: NiedielnitsevIvan <81557788+NiedielnitsevIvan@users.noreply.github.com>
Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
Co-authored-by: monteri <36768631+monteri@users.noreply.github.com>
2024-07-10 20:07:41 +05:00
Nathan Sprenkle
deb5b0f038 feat: add filter to hook render of XBlock (#34865)
* Bumps openedx-filters to 1.9.0
* Adds filter to hook render of XBlock
* Disables a too-many-statements warning on render_xblock function
2024-06-25 11:17:20 -04:00
Deborah Kaplan
68b052620a Merge branch 'master' into bleach#33209 2024-06-10 11:27:12 -04:00
Juliana Kang
cb52915370 fix: Financial Assistance Letter extend time to award and styling edits (#34913)
REV-4066
2024-06-06 16:41:54 -04:00
Irtaza Akram
f7229e0aad chore: replace bleach with nh3 2024-05-28 13:02:16 +05:00
Maria Grimaldi
33b8137763 refactor: rename minimum partition ID constant to be more generic (#34529)
Rename MINIMUM_STATIC_PARTITION_ID to MINIMUM_UNUSED_PARTITION_ID
so it's not confusing when used to generate IDs for static or dynamic
partitions.
2024-05-20 14:38:58 -04:00
Glib Glugovskiy
c5d94d21bf docs: change default value for a toggle to correct doc (#34747) 2024-05-09 08:57:43 -03:00
Troy Sankey
08323ccb18 Merge pull request #34686 from openedx/pwnage101/ENT-8766
fix: remove setting toggle which might be causing bug with future course redirects
2024-05-06 09:52:01 -07:00
Ivan Niedielnitsev
333f1ff2c2 feat: [FC-0056] Add waffle flags for navigation and auxiliary (discussion and notification) sidebars (#34650)
Add waffle flags for navigation and auxiliary (discussion and notification) sidebars.
---------

Co-authored-by: Glib Glugovskiy <glib.glugovskiy@raccoongang.com>
Co-authored-by: Glib Glugovskiy <glugov1998@gmail.com>
Co-authored-by: Adolfo R. Brandes <arbrandes@arbrand.es>
2024-05-06 11:04:51 -03:00
Troy Sankey
2cb35cb24b fix: remove setting toggle which might be causing bug with future course redirects
We've long rolled out the
`COURSEWARE_COURSE_NOT_STARTED_ENTERPRISE_LEARNER_ERROR` setting toggle so
it should be safe to remove.

I'm completely at a loss as to why course access checks are not
returning the `course_not_started_enterprise_learner` error code when it
should, but it does in stage/local, so this PR is grasping at straws.

ENT-8766
2024-05-03 11:15:59 -07:00
Ivan Niedielnitsev
30836729b7 feat: Implement Sidebar Navigation [FC-0056] (#34457)
This commit addresses to the need to add an API for Sidebar Navigation
that returns the course structure with sections, subsections, and
**units**, according to user access rules. (Previous outline requests
only went down to subsections.)

To improve the performance of the API, we cache the course structure
for a user, which makes it much easier to calculate the block structure
for the user at each request. However, there may be cases when this
caching can lead to an overflow of the cache storage in high-loaded LMS
with large courses, so the corresponding flag
"courseware.disable_navigation_sidebar_blocks_caching" was added so
that this caching can be disabled.
2024-04-26 12:04:42 -04:00
Zachary Hancock
3852358ca2 feat: feature setting to gate courseware search to verified enrollments (#34606)
Adds a Django setting that limits courseware search to users in a verified enrollment track.
2024-04-25 11:41:53 -04:00
Feanil Patel
9bd4474f7d test: Reduce query counts now that we dropped django-splash. 2024-04-18 12:43:33 -04:00