Commit Graph

28 Commits

Author SHA1 Message Date
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
Zia Fazal
1556be5851 feat: Add EnrollmentsService in XBlockRuntime and block renderer (#34238)
* feat: Add EnrollmentsService in XBlockRuntime and block renderer

These changes give ability to use `EnrollmentsService` in XBlocks
Add `get_active_enrollments_by_course_and_user` method to `EnrollmentsService` which can be used to get active enrollment of user for a give course
2024-03-19 09:41:11 +05:00
Agrendalath
d57e5f61ea fix: add JwtRestrictedApplication check to XBlock callback 2024-01-10 08:47:08 -05:00
thezaeemaanwar
0b3e4d73b6 feat!: Removed Badges App
fix: restored badges handlers

feat: remove FE code for badges

fix: resolved failing tests

fix: removed test case for badges app

fix: unused import error

fix: Response Field Count

fix: shareable account response length

fix: resolved PR comments

fix: revert settings override

feat!: Removed Badges App

fix: restored badges handlers

feat: remove FE code for badges

fix: resolved failing tests

fix: removed test case for badges app

fix: unused import error

fix: Response Field Count

fix: shareable account response length

fix: revert subscription badge
2023-10-18 20:30:04 +05:00
Usama Sadiq
7710e60328 fix: fix middleware get_response parameter deprecation warning (#33067) 2023-08-22 15:52:30 +05:00
Agrendalath
92b684004e refactor: reuse services and wrappers between XBlocks (fixed)
This re-applies commit 36cc415 with handling an invalid context_key in the
`PartitionService`. It can happen when rendering a `LibraryContentBlock` in
Studio because this service is initialized by the modulestore when validating
an XBlock to gather its error messages in the `studio_xblock_wrapper`.
2023-07-19 18:01:59 +02: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
Piotr Surowiec
c6bd98e51a Revert "refactor: reuse services and wrappers between XBlocks" (#32730)
This reverts commit 36cc415fc2.
2023-07-13 10:05:34 -04:00
Agrendalath
6a8e695a0e refactor: remove redundant masquerade handling from runtime initialization
This part was added in 3d7246ecc8.
Then, 0dd4978f37 refactored the approach, but
did not remove these lines.
2023-06-30 15:06:43 +02:00
Agrendalath
36cc415fc2 refactor: reuse services and wrappers between XBlocks 2023-06-30 15:06:43 +02:00
Agrendalath
6c435bb68c feat: remove field-data service from runtime initialization 2023-06-26 19:21:22 +02:00
Agrendalath
5f46ea52cd feat: remove field data binding from the runtime 2023-06-26 19:21:22 +02:00
Agrendalath
71fee4a4a0 feat!: remove block handling from runtime initialization of ReplaceURLService
BREAKING CHANGE: This removes the following deprecated shims from the runtime:
`replace_urls`, `replace_course_urls`, `replace_jump_to_id_urls`. XBlocks need
to use the `replace_urls` service instead.
2023-06-21 20:28:24 +02:00
Piotr Surowiec
0137f21627 feat: move XQueueService from the runtime to ProblemBlock
The XQueueService is used only by the ProblemBlock. Therefore, we are moving 
it out of the runtime, and into the ProblemBlock, where it's initialized only 
when it's going to be used.
2023-06-21 20:08:31 +02:00
Agrendalath
9fbc263edd feat: remove block-specific handling from runtime role checks 2023-06-15 11:08:03 +02: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
Pooja Kulkarni
c80fba689a refactor: rename descriptor -> block within lms/djangoapps/courseware
Co-authored-by: Agrendalath <piotr@surowiec.it>
2023-04-26 17:10:53 +02:00
Kaustav Banerjee
c5439221cb chore: address review comments 2023-04-21 11:53:49 +02:00
Kaustav Banerjee
d0fa2d65e3 test: fix test cases and lint issues 2023-04-21 11:53:49 +02:00
Kaustav Banerjee
20ed3d64ec feat: add _runtime_services attribute to DescriptorSystem 2023-04-21 11:53:49 +02:00
Kaustav Banerjee
7d8f54fa88 chore: cleanup LmsModuleSystem and PreviewModuleSystem 2023-04-21 11:53:49 +02:00
Kaustav Banerjee
09e1197053 feat: remove CombinedSystem 2023-04-21 11:53:49 +02:00
Kaustav Banerjee
18fea868a9 feat: remove usage of LmsModuleSystem and PreviewModuleSystem 2023-04-21 11:53:48 +02:00
Kaustav Banerjee
017f8469de feat: merge ModuleSystem with DescriptorSystem 2023-04-21 11:53:48 +02:00
Braden MacDonald
626f11f608 test: Import linter: optionally enforce usage of a package's public API (#31903)
* test: warn about dependencies from cms->openedx->lms and vice versa

* test: warn about importing from package's internal implementation code

* chore: Update some imports to use public APIs only

* chore: Update 'bookmarks' app to have stricter public API

* fix: we are sharing 'adapters' from olx_rest_api to content_staging
2023-04-20 11:34:51 -07:00
0x29a
d338f00e39 refactor: rename module (or item) -> block within cms 2023-01-30 18:15:23 +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