Fixes TNL-7113 and TNL-7112, related to missing attributes in course tabs

This commit is contained in:
Dave St.Germain
2020-03-06 14:29:59 -05:00
parent 2f148496bf
commit b166788a8d
2 changed files with 15 additions and 1 deletions

View File

@@ -779,6 +779,20 @@ class CourseOverview(TimeStampedModel):
"""
return self._original_course.textbooks
@property
def pdf_textbooks(self):
"""
TODO: move this to the model.
"""
return self._original_course.pdf_textbooks
@property
def html_textbooks(self):
"""
TODO: move this to the model.
"""
return self._original_course.html_textbooks
@property
def hide_progress_tab(self):
"""

View File

@@ -107,7 +107,7 @@ class CourseInfoSerializer(serializers.Serializer): # pylint: disable=abstract-
tabs = []
for priority, tab in enumerate(get_course_tab_list(course_overview.effective_user, course_overview)):
tabs.append({
'title': tab.title,
'title': tab.title or tab.get('name'),
'slug': tab.tab_id,
'priority': priority,
'type': tab.type,