Skip to content

Commit

Permalink
fix: adding a temporal fix to allow mport course from olive+ into nut…
Browse files Browse the repository at this point in the history
…meg (#827)
  • Loading branch information
DonatoBD authored Jul 23, 2024
1 parent cc5a327 commit 517bc35
Showing 1 changed file with 9 additions and 0 deletions.
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

0 comments on commit 517bc35

Please sign in to comment.