Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions openedx_learning/api/authoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@
from ..apps.authoring.components.api import *
from ..apps.authoring.contents.api import *
from ..apps.authoring.publishing.api import *

# This was renamed after the authoring API refactoring pushed this and other
# app APIs into the openedx_learning.api.authoring module. Here I'm aliasing to
# it's previous name, to make migration a little easier.
create_next_version = create_next_component_version
4 changes: 2 additions & 2 deletions openedx_learning/apps/authoring/components/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"get_or_create_component_type",
"create_component",
"create_component_version",
"create_next_version",
"create_next_component_version",
"create_component_and_version",
"get_component",
"get_component_by_key",
Expand Down Expand Up @@ -109,7 +109,7 @@ def create_component_version(
return component_version


def create_next_version(
def create_next_component_version(
component_pk: int,
/,
title: str,
Expand Down
6 changes: 3 additions & 3 deletions tests/openedx_learning/apps/authoring/components/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def test_multiple_versions(self):
)

# Two text files, hello.txt and goodbye.txt
version_1 = components_api.create_next_version(
version_1 = components_api.create_next_component_version(
self.problem.pk,
title="Problem Version 1",
content_to_replace={
Expand All @@ -440,7 +440,7 @@ def test_multiple_versions(self):

# This should keep the old value for goodbye.txt, add blank.txt, and set
# hello.txt to be a new value (blank).
version_2 = components_api.create_next_version(
version_2 = components_api.create_next_component_version(
self.problem.pk,
title="Problem Version 2",
content_to_replace={
Expand Down Expand Up @@ -469,7 +469,7 @@ def test_multiple_versions(self):

# Now we're going to set "hello.txt" back to hello_content, but remove
# blank.txt, goodbye.txt, and an unknown "nothere.txt".
version_3 = components_api.create_next_version(
version_3 = components_api.create_next_component_version(
self.problem.pk,
title="Problem Version 3",
content_to_replace={
Expand Down