diff --git a/python/ide/impl/src/com/jetbrains/python/training/PyOnboardingTourPromoter.kt b/python/ide/impl/src/com/jetbrains/python/training/PyOnboardingTourPromoter.kt index 991c39757c84..b493bab0b805 100644 --- a/python/ide/impl/src/com/jetbrains/python/training/PyOnboardingTourPromoter.kt +++ b/python/ide/impl/src/com/jetbrains/python/training/PyOnboardingTourPromoter.kt @@ -1,10 +1,19 @@ // Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.jetbrains.python.training +import com.intellij.openapi.application.ApplicationNamesInfo import com.intellij.openapi.util.IconLoader import training.ui.welcomeScreen.OnboardingLessonPromoter import javax.swing.Icon +import javax.swing.JPanel internal class PyOnboardingTourPromoter : OnboardingLessonPromoter("python.onboarding") { override fun promoImage(): Icon = IconLoader.getIcon("img/pycharm-onboarding-tour.png", PyOnboardingTourPromoter::class.java) + + override fun getPromotionForInitialState(): JPanel? { + if (ApplicationNamesInfo.getInstance().fullProductNameWithEdition.equals("PyCharm Edu")) { + return null + } + return super.getPromotionForInitialState() + } } \ No newline at end of file diff --git a/python/python-features-trainer/src/com/jetbrains/python/ift/PythonLearningCourse.kt b/python/python-features-trainer/src/com/jetbrains/python/ift/PythonLearningCourse.kt index 53920175e9e7..a4cef3a091c4 100644 --- a/python/python-features-trainer/src/com/jetbrains/python/ift/PythonLearningCourse.kt +++ b/python/python-features-trainer/src/com/jetbrains/python/ift/PythonLearningCourse.kt @@ -1,6 +1,7 @@ // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.jetbrains.python.ift +import com.intellij.openapi.application.ApplicationNamesInfo import com.jetbrains.python.PythonLanguage import com.jetbrains.python.ift.lesson.assistance.PythonEditorCodingAssistanceLesson import com.jetbrains.python.ift.lesson.basic.PythonContextActionsLesson @@ -35,7 +36,9 @@ import training.learn.lesson.general.refactorings.ExtractVariableFromBubbleLesso class PythonLearningCourse : LearningCourseBase(PythonLanguage.INSTANCE.id) { override fun modules() = onboardingTour() + stableModules() + CourseManager.instance.findCommonModules("Git") - private fun onboardingTour() = listOf( + private val disableOnboardingLesson get() = ApplicationNamesInfo.getInstance().fullProductNameWithEdition.equals("PyCharm Edu") + + private fun onboardingTour() = if (!disableOnboardingLesson) listOf( LearningModule(name = PythonLessonsBundle.message("python.onboarding.module.name"), description = PythonLessonsBundle.message("python.onboarding.module.description", LessonUtil.productName), primaryLanguage = langSupport, @@ -43,6 +46,7 @@ class PythonLearningCourse : LearningCourseBase(PythonLanguage.INSTANCE.id) { listOf(PythonOnboardingTour()) } ) + else emptyList() private fun stableModules() = listOf( LearningModule(name = LessonsBundle.message("editor.basics.module.name"),