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: adding a temporal fix to allow mport course from olive+ into nutmeg #827

Merged
merged 1 commit into from
Jul 23, 2024
Merged
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
9 changes: 9 additions & 0 deletions common/lib/xmodule/xmodule/tabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,15 @@ def upgrade_tabs(cls, tabs):
Reverse and Rename Courseware to Course and Course Info to Home Tabs.
"""
if tabs and len(tabs) > 1:
## Note: this is a temporal hot fix to allow course import from olive+ into nutmeg
if tabs[0].get('type') != 'course_info' and tabs[1].get('type') != 'course_info':
temp_tab = {
'type': 'course_info',
'name': 'Home',
'course_staff_only': False
}
tabs.insert(1,temp_tab)

if tabs[0].get('type') == 'courseware' and tabs[1].get('type') == 'course_info':
tabs[0], tabs[1] = tabs[1], tabs[0]
tabs[0]['name'] = _('Home')
Expand Down
Loading