Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add language in the course listing API for syncing with dataloader #576

Open
wants to merge 1 commit into
base: develop-koa
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions lms/djangoapps/course_api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class CourseSerializer(serializers.Serializer): # pylint: disable=abstract-meth
mobile_available = serializers.BooleanField()
hidden = serializers.SerializerMethodField()
invitation_only = serializers.BooleanField()
language = serializers.CharField()

# 'course_id' is a deprecated field, please use 'id' instead.
course_id = serializers.CharField(source='id', read_only=True)
Expand Down
3 changes: 2 additions & 1 deletion lms/djangoapps/course_api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ class CourseListView(DeveloperErrorViewMixin, ListAPIView):
"org": "edX",
"start": "2015-07-17T12:00:00Z",
"start_display": "July 17, 2015",
"start_type": "timestamp"
"start_type": "timestamp",
language: null or 'en' # language code
}
]
"""
Expand Down
3 changes: 1 addition & 2 deletions openedx/core/djangoapps/content/course_overviews/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ def _create_or_update(cls, course):
course_overview.course_video_url = CourseDetails.fetch_video_url(course.id)
course_overview.self_paced = course.self_paced

if not CatalogIntegration.is_enabled():
course_overview.language = course.language
course_overview.language = course.language

return course_overview

Expand Down