|
6 | 6 | Only Studio-specfic helper functions should be added here. |
7 | 7 | Platform-wide Python APIs should be added to an appropriate api.py file instead. |
8 | 8 | """ |
| 9 | + |
9 | 10 | from __future__ import annotations |
10 | 11 |
|
11 | 12 | import json |
|
33 | 34 | from cms.djangoapps.models.settings.course_grading import CourseGradingModel |
34 | 35 | from cms.lib.xblock.upstream_sync import UpstreamLink, UpstreamLinkException |
35 | 36 | from cms.lib.xblock.upstream_sync_block import fetch_customizable_fields_from_block |
| 37 | +from openedx.core.djangoapps.content_staging.api import StagedContentID |
36 | 38 | from openedx.core.djangoapps.content_staging.data import LIBRARY_SYNC_PURPOSE |
37 | 39 | from openedx.core.djangoapps.content_tagging.types import TagValuesByObjectIdDict |
38 | 40 | from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers |
@@ -312,7 +314,7 @@ def _rewrite_static_asset_references(downstream_xblock: XBlock, substitutions: d |
312 | 314 |
|
313 | 315 |
|
314 | 316 | def _insert_static_files_into_downstream_xblock( |
315 | | - downstream_xblock: XBlock, staged_content_id: int, request |
| 317 | + downstream_xblock: XBlock, staged_content_id: StagedContentID, request |
316 | 318 | ) -> StaticFileNotices: |
317 | 319 | """ |
318 | 320 | Gets static files from staged content, and inserts them into the downstream XBlock. |
@@ -635,7 +637,7 @@ def _import_xml_node_to_parent( |
635 | 637 |
|
636 | 638 | def _import_files_into_course( |
637 | 639 | course_key: CourseKey, |
638 | | - staged_content_id: int, |
| 640 | + staged_content_id: StagedContentID, |
639 | 641 | static_files: list[content_staging_api.StagedContentFileData], |
640 | 642 | usage_key: UsageKey, |
641 | 643 | ) -> tuple[StaticFileNotices, dict[str, str]]: |
@@ -700,7 +702,7 @@ def _import_files_into_course( |
700 | 702 |
|
701 | 703 | def _import_file_into_course( |
702 | 704 | course_key: CourseKey, |
703 | | - staged_content_id: int, |
| 705 | + staged_content_id: StagedContentID, |
704 | 706 | file_data_obj: content_staging_api.StagedContentFileData, |
705 | 707 | usage_key: UsageKey, |
706 | 708 | ) -> tuple[bool | None, dict]: |
@@ -760,7 +762,7 @@ def _import_file_into_course( |
760 | 762 |
|
761 | 763 | def _import_transcripts( |
762 | 764 | block: XBlock, |
763 | | - staged_content_id: int, |
| 765 | + staged_content_id: StagedContentID, |
764 | 766 | static_files: list[content_staging_api.StagedContentFileData], |
765 | 767 | ): |
766 | 768 | """ |
|
0 commit comments