From 517bc3586b677cc93b33550bdb4641c07dd084b4 Mon Sep 17 00:00:00 2001 From: Donato Bracuto <77167078+DonatoBD@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:00:57 -0400 Subject: [PATCH] fix: adding a temporal fix to allow mport course from olive+ into nutmeg (#827) --- common/lib/xmodule/xmodule/tabs.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/lib/xmodule/xmodule/tabs.py b/common/lib/xmodule/xmodule/tabs.py index 3d7bdb70d7c..9d0a3328b55 100644 --- a/common/lib/xmodule/xmodule/tabs.py +++ b/common/lib/xmodule/xmodule/tabs.py @@ -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')