19 Commits

Author SHA1 Message Date
Navin Karkera
09e86e24b2 refactor!: use String field instead of Dict field to store top_level_downstream_parent_key (#37448)
* refactor!: use String field instead of Dict field to store top_level_downstream_parent_key

Since this is a new field no production instance should have this field
yet. Developers need to delete their old courses as this change will
raise error in all course pages.

* chore: add `top_level_parent` field in ComponentLink and ContainerLink admin

* refactor: use ":" as separator

* refactor: block key parsing and tests
2025-10-09 22:03:23 +05:30
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
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
Justin Hynes
26ae8b4bcd feat: add management command to clean stale certificate availability dates
[MICROBA-1806]

We are aware of product issue where it is possible for a self-paced course-run to get have a `certificate_availability_date` created in the course settings. This can have an adverse effect on the Credentials IDA where a learner's Program Record does not correctly display the course certificates they have earned because of this data. This not only causes confusion for our learners, as it appears that a course certificate a learner can access and share in the LMS is displayed as unearned in the Credential's program record, but this can also cause issues when a learner attempts to share their program record through a credit pathway and the program record would not accurately reflect their program completion.

Unfortunately, the settings that manage the certificate availability date are hidden for self-paced courses in Studio (as they should only be used in instructor-paced courses).

For this reason, we are introducing a management command that will remove a certificate available date for a specified (self-paced) course-run. This will allow us to fix issues for individual learners while we work on a longer-term fix for the larger issue.

* Add new `clean_stale_certificate_available_dates` management command
* Add new `CleanStaleCertificateAvailabilityDates` Configuration Model
* Add tests for the new management command
* (Unrelated cleanup) Fix potential issue with private.py settings in the CMS being overwritten in devstack.py for developers using devstack.
2022-07-11 13:13:27 -04:00
Michael Terry
35df2723d8 feat: add a config model for the backfill_course_tabs command
- Adds a BackfillCourseTabsConfig model to manage the arguments
  to that command
- Adds batching arguments using that model
- Adds some extra logging for the failed courses
2022-03-18 11:50:55 -04:00
M. Zulqarnain
e54fb5f76e feat: New codemods on CMS (#28768) 2021-10-25 12:59:54 +05:00
Julia Eskew
f88a44d8dd TNL-8080 ][: Use module mixin and fix permissions for proxy models. (#27811)
* chore: Update Python requirements via pip-tools. Needed the newest
edx-django-utils version.

* refactor: Use the newly-added ReadOnlyAdminMixin from the updated module and
remove the existing implementation.

* fix: edx-platform now has a Django proxy model - CourseOutlineRegenerate.
Without this fix, the permissions to the model's admin interface cannot be
added to a group and successfully granted to users.
2021-06-02 17:33:03 -04:00
Julia Eskew
d83051f33b feat: Add Django admin interface to backfill course outlines. (#27749)
TNL-8080
2021-06-01 13:40:32 -04:00
Kyle McCormick
538dbf696b Import CMS code using fully qualified module names
or, using proper the proper Python 3 relative imports
(e.g., 'from .views import x') which are standard and
unambiguous.
2020-10-19 09:34:31 -04:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Feanil Patel
1f7b12a38d Remove references to push notifications.
Push notifications was only ever setup to connect to Parse.com a service
that has been discontinued.  Since we haven't replaced the functionality
for a few years now, remove this dead code.

In cms/templates/js/course_info_update.underscore we're allowing content
to not be escaped because this is by design according to the tests.
Long term there should be a better fix for this but for now this is
intended behavior.
2019-07-24 11:45:46 -04:00
arbisoft
400fdf6399 Fixing python-modernize issues. 2019-07-09 17:10:40 +05:00
Farhanah Sheets
34a96fb58d Remove NewAssets config model & create migration file 2018-03-12 13:21:16 -04:00
Eric Fischer
a830073bb2 Add waffle flag for NewAssetsPage 2017-09-21 16:45:12 -04:00
Andy Armstrong
ebb04ca396 Reorder Studio imports using isort 2017-05-30 17:00:50 -04:00
Nimisha Asthagiri
a87c881024 MA-612 Mobile Push Notification Studio Django admin setting 2015-04-18 15:30:14 -04:00
Nimisha Asthagiri
4b53f4df27 Studio video upload CSV download changes. 2015-01-09 20:48:48 -05:00
Greg Price
4e1925129e Add URL download endpoint for Studio video uploads
The endpoint returns an Excel-dialect CSV file for download.
2015-01-09 19:45:31 -05:00