Commit Graph

264 Commits

Author SHA1 Message Date
Jillian
5b3caa93e2 feat: store content.child_usage_keys in Container search document [FC-0083] (#36528)
* feat: store content.child_usage_keys in Container search document
  Stores the draft children + published children (if applicable)

Related fixes:
* fix: lib_api.get_container does not take a "user" arg
* refactor: fetch_customizable_fields_from_container does not need a "user" arg
* refactor: moves tags_count into LibraryItem
   because anything that appears in a library may be tagged.
* refactor: remove get_container_from_key from public API
   API users must use get_container and ContainerMetadata.
* refactor: made set_library_item_collections take an entity_key string instead of
  a PublishableEntity instance, so we don't need to fetch a Container object to call it.
* refactor: changed ContainerLink.update_or_create to take the container PK
  instead of a Container object, since this is enough.
  Added container_pk to ContainerMetadata to support this.
2025-05-02 10:47:25 +09:30
Navin Karkera
c2d9e40be4 refactor: update sync model helper function docs and minor cleanup (#36599)
* refactor: update sync model helper function docs

Adds some comments to explain certain confusing sections

* refactor: sync library content method

* feat: use edited_on block field

* test: modified field in course block index

* fix: extract uncommon methods to child class from base
2025-04-30 13:40:52 -07:00
Navin Karkera
1cd73d1b96 feat: support for syncing units from libraries to courses (#36553)
* feat: library unit sync
* feat: create component link only for component xblocks
* feat: container link model
* feat: update downstream api views
* feat: delete extra components in container on sync (not working)
* fix: duplicate definitions of LibraryXBlockMetadata
* test: add a new integration test suite for syncing
* feat: partially implement container+child syncing
* fix: blockserializer wasn't always serializing all HTML block fields
* feat: handle reorder, addition and deletion of components in sync

Updates children components of unit in course based on upstream unit,
deletes removed component, adds new ones and updates order as per
upstream.

* feat: return unit upstreamInfo and disallow edits to units in courses that are sourced from a library (#773)
* feat: Add upstream_info to unit
* feat: disallow edits to units in courses that are sourced from a library (#774)

---------

Co-authored-by: Jillian Vogel <jill@opencraft.com>
Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>

* docs: capitalization of XBlock

Co-authored-by: David Ormsbee <dave@axim.org>

* refactor: (minor) change python property name to reflect type better

* fix: lots of "Tried to inspect a missing...upstream link" warnings

when viewing a unit in Studio

* docs: mention potential REST API for future refactor

* fix: check if upstream actually exists before making unit read-only

* chore: fix camel-case var

* fix: test failure when mocked XBlock doesn't have UpstreamSyncMixin

---------

Co-authored-by: Braden MacDonald <braden@opencraft.com>
Co-authored-by: Chris Chávez <xnpiochv@gmail.com>
Co-authored-by: Jillian Vogel <jill@opencraft.com>
Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
Co-authored-by: Braden MacDonald <mail@bradenm.com>
Co-authored-by: David Ormsbee <dave@axim.org>
2025-04-24 11:41:47 -07:00
Kyle McCormick
8e9f94424d feat!: Flip Studio MFE Waffle Flags to be On-By-Default (#36495)
This makes nearly all of Studio React-by-default by replacing the
"opt-in-to-React" flags with a set of parallel
"opt-out-of-React-and-use-the-legacy-experience" flags. Here is the
mapping:

* `contentstore.new_studio_mfe.use_new_unit_page` ->
  `!legacy_studio.unit_editor`
* `new_core_editors.use_new_problem_editor` ->
  `!legacy_studio.problem_editor`
* `new_core_editors.use_new_text_editor` ->
  `!legacy_studio.text_editor`
* `new_core_editors.use_new_video_editor` ->
  `!legacy_studio.video_editor`
* `new_studio_mfe.use_new_home_page` ->
  `!legacy_studio.home`
* `contentstore.new_studio_mfe.use_new_custom_pages` ->
  `!legacy_studio.custom_pages`
* `contentstore.new_studio_mfe.use_new_schedule_details_page` ->
  `!legacy_studio.schedule_details`
* `contentstore.new_studio_mfe.use_new_advanced_settings_page` ->
  `!legacy_studio.advanced_settings`
* `contentstore.new_studio_mfe.use_new_grading_page` ->
  `!legacy_studio.grading`
* `contentstore.new_studio_mfe.use_new_updates_page` ->
  `!legacy_studio.updates`
* `contentstore.new_studio_mfe.use_new_import_page` ->
  `!legacy_studio.import`
* `contentstore.new_studio_mfe.use_new_export_page` ->
  `!legacy_studio.export`
* `contentstore.new_studio_mfe.use_new_files_uploads_page` ->
  `!legacy_studio.files_uploads`
* `contentstore.new_studio_mfe.use_new_course_outline_page` ->
  `!legacy_studio.course_outline`
* `contentstore.new_studio_mfe.use_new_course_team_page` ->
  `!legacy_studio.course_team`
* `contentstore.new_studio_mfe.use_new_certificates_page` ->
  `!legacy_studio.certificates`
* `contentstore.new_studio_mfe.use_new_textbooks_page` ->
  `!legacy_studio.textbooks`
* `contentstore.new_studio_mfe.use_new_group_configurations_page` ->
  `!legacy_studio.configurations`

Part of: https://github.com/openedx/edx-platform/issues/36275
2025-04-24 12:34:35 -04:00
Bryann Valderrama
f90e59e52a docs: add event_type inline code annotation for open edX events (#36355) 2025-03-14 09:55:50 +01:00
Navin Karkera
711d6aa357 refactor: downstream entity links api [FC-0076] (#36311)
Refactors downstream links API to handle multiple filters using a single API. Also adds a new route to return summary of library links for a given course.
2025-03-12 17:56:12 +00:00
Rômulo Penido
9451cfca26 feat: add API to return list of downstream blocks for an upstream [FC-0076] (#36253)
Adds the API for listing downstream contexts and parents for a given publishable entity.
2025-02-25 13:55:02 -05:00
Navin Karkera
a1d0826a2a feat: entity link view and api (#36190)
Adds api for listing upstream entity links for a given course.
2025-02-18 15:34:00 +00:00
Navin Karkera
2598084946 feat: upstream downstream link model [FC-0076] (#36111)
Adds models, tasks, signal handlers and api's for adding, updating and deleting upstream->downstream links in database.
2025-02-11 12:15:50 -05:00
Raymond Zhou
02fc9c928f 2u/course optimizer (#35887) 2025-02-06 12:47:17 -05:00
Muhammad Arslan
838977a8f3 feat!: Remove DEPR waffle switch: ENABLE_GLOBAL_STAFF_OPTIMIZATION 2025-01-14 14:02:37 +05:00
Rômulo Penido
8d4909a999 fix: content libraries permissions
This PR changes the permissions for content libraries so that only
people who can create courses should be allowed to create new content
libraries.
2024-12-06 09: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
Muhammad Adeel Tajamul
ebe3dc5e12 fix: fixed course update notification UI in notification tray (#35715) 2024-10-28 15:47:08 +05:00
Braden MacDonald
9e28ba92ec feat: minimal UI for the Problem Bank block 2024-10-22 17:27:04 -07:00
Navin Karkera
7e8fb4393e feat: adds Library Content (v2) button to Studio Unit page (#35670)
Requires that v2 libraries are enabled.
2024-10-21 10:32:54 -07:00
Muhammad Adeel Tajamul
968f4f716b feat: removed styling from course update notification (#35680) 2024-10-21 16:04:44 +05:00
Jillian
96811d6452 feat: adds waffle flags for legacy libraries v1 and new libraries v2 (#35576)
* refactor: rename CourseHomeSerializer to StudioHomeSerializer

to better reflect how this serializer/API is used in the Authoring MFE

* feat: adds waffle flags for legacy libraries v1 and new libraries v2 in new Studio Home

These waffle flags replace the MFE env flag LIBRARY_MODE.

* refactor: use contentstore.toggles.libraries_v1_enabled()

and ENABLE_CONTENT_LIBRARIES feature toggle where possible.

ENABLE_CONTENT_LIBRARIES has been incorporated into both the
libraries_v1_enabled() and libraries_v2_enabled() toggles:
FEATURES['ENABLE_CONTENT_LIBRARIES'] must be true for either version of
libraries to be "enabled".
2024-10-18 09:43:01 -07: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
Demid
448edd7e5f feat: add can_access_advanced_settings to studio home (#35426) 2024-09-12 12:36:35 -04:00
Kaustav Banerjee
79fb1cc404 fix: hide new library button for ineligible users in split studio view (#35316) 2024-09-06 11:21:56 -07:00
Muhammad Adeel Tajamul
481a50717a feat: updated content in course_update notification (#35373) 2024-08-29 18:07:57 +05:00
Ahtisham Shahid
9bd692413a fix: make course update email pref false (#35224)
fix: updated unit tests

fix: updated unit tests
2024-08-07 14:55:02 +05:00
Feanil Patel
1fa8e07f1c style: Fix a pylint and other style violations. 2024-07-25 11:06:17 -04:00
connorhaugh
df635e0fae fix: libraries across orgs 2024-07-25 10:12:16 -04:00
Ahtisham Shahid
362899e797 fix: Added message to Course update notification in case of small text (#34819) 2024-05-21 13:31:41 +05:00
Rômulo Penido
b42da7429f feat: Enable taxonomy/tagging feature in MFE by default (#34633)
* feat: make tagging feature enabled by default

* fix: use the correct flag for tagging enabled

* fix: make compatible with other changes from master

* fix: more compatibility fixes

* fix: show tag counts at all levels of the outline, not just units

* chore: typo

* test: fix counts in test suite now that tagging is on by default

---------

Co-authored-by: Braden MacDonald <braden@opencraft.com>
Co-authored-by: Yusuf Musleh <yusuf@opencraft.com>
2024-05-09 18:57:05 +05:30
Kaustav Banerjee
d43a2f73eb feat: default grade designations configurable from settings (#32406) 2024-05-08 01:14:03 +05:30
Maria Grimaldi
b792222772 fix: add support to Group Configuration view for Teams partitions (#34643) 2024-05-06 11:46:02 -04:00
Glib Glugovskiy
f9caa8ee48 feat: update path for textbook page on course-authoring mfe redirect 2024-04-30 20:31:08 +03:00
Maria Grimaldi
809ffc3743 feat: connect teams with content groups using dynamic partition generator (#33788)
Implements the connection from the teams feature to the content groups feature. This implementation uses the dynamic partition generator extension point to associate content groups with the users that belong to a Team.

This implementation was heavily inspired by the enrollment tracks dynamic partitions.
2024-04-25 13:02:49 -04:00
Saad Yousaf
164c8ab835 fix: fix course_update event content param 2024-04-22 13:15:31 +05:00
ruzniaievdm
a8586e5114 feat: display error notifications on the Unit page (#34450) 2024-04-09 09:52:35 -04:00
ruzniaievdm
6d13b77495 feat: [FC-0044] group configurations API DRF (#34389) 2024-03-25 10:02:34 -04:00
ruzniaievdm
85dd7f35e3 feat: [FC-0044] certificates API DRF (#34339)
* feat: [FC-0044] certificates API DRF

* fix: remove unused import from previous commits
2024-03-22 10:46:34 -04:00
Justin Hynes
907c32ae6d fix: add validation to cdb and cad settings on update (#34406)
[APER-3228]

This PR tries to correct bad data on a course update before it enters the system. There are times when we are updating a course (via Studio) and we save bad data that has been persisted and passed to the backend from the CMS's legacy Django template-based frontend.

The bad data doesn't affect the LMS or CMS much, as there is extra logic in the monolith around course pacing. However, downstream services (e.g. Credentials) don't understand the concept of course pacing and will persist bad data (like a certificate available date associated with a self-paced course run).

The most common problem that manifests is that Credentials will hide a certificate from a learner on their Learner Record, even though the course certificate is visible and accessible to the learner from the LMS.
2024-03-21 13:46:45 -04:00
ruzniaievdm
3ecc4bf6a0 feat: [FC-0044] textbooks API DRF (#34388)
* feat: [FC-0044] textbooks API DRF

* fix: resolve discussions
2024-03-21 13:39:03 -04:00
Maria Grimaldi
45178e0ced feat: add paginated HomePageCoursesV2 view with filtering & ordering (#34173) 2024-03-20 11:31:59 -04:00
ruzniaievdm
7189bd6484 feat: [FC-0044] add waffle flag support (#34338)
* feat: [FC-0044] add waffle flag support

* fix: resolve discussions
2024-03-19 10:16:16 -04:00
ruzniaievdm
844db29d64 feat: add sequence_ids to container response (#34337)
* feat: add sequence_ids to container response

* fix: PR comments fix

* fix: update

---------

Co-authored-by: monteri <36768631+monteri@users.noreply.github.com>
2024-03-12 10:27:23 -04:00
Kshitij Sobti
c3c0adf978 feat: add support for zip files to course and library import code (#34191)
Co-authored-by: Rodrigo Ferreira de Souza <rodfersou@gmail.com>
2024-03-08 18:51:35 +01:00
Saad Yousaf
e3467f91a3 fix: fix content_url for course update notification 2024-03-06 14:37:25 +05:00
Saad Yousaf
a110fc79d5 feat: add notification for course updates 2024-02-27 13:58:50 +05:00
Awais Ansari
5007418803 feat: add discussion configuration redirect in unit settings (#34266)
* feat: add discussion configuration redirect in unit settings

* test: fix test course index file test cases after adding discussion redirection
2024-02-22 16:29:36 +05:00
Navin Karkera
6edc0c2dd9 feat: add discussion settings to course index api (#34174) 2024-02-05 09:13:11 -05:00
Adolfo R. Brandes
cbe865a77f Merge pull request #34036 from raccoongang/ruzniaievdm/feat/unit-page-drf
feat: [FC-0044] Unit page API as DRF
2024-01-30 19:23:12 +00:00
SaadYousaf
d772ed1519 feat: add new tracking event for course updates. 2024-01-16 14:41:26 +05:00
ruzniaievdm
ff8d3eae72 feat: Unit page API as DRF 2024-01-10 11:53:36 +02:00