Fixes TNL-7113 and TNL-7112, related to missing attributes in course tabs
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user