mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 08:51:02 +07:00
IFT-518 Make Python onboarding lesson and promoter available only in PyCharm Community/Professional
GitOrigin-RevId: 12a710a6e519873c36d750d1967daf9dfe78e84f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
eee95f36ec
commit
1073190fc7
@@ -1,7 +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.intellij.util.PlatformUtils
|
||||
import com.jetbrains.python.PythonLanguage
|
||||
import com.jetbrains.python.ift.lesson.assistance.PythonEditorCodingAssistanceLesson
|
||||
import com.jetbrains.python.ift.lesson.basic.PythonContextActionsLesson
|
||||
@@ -37,9 +37,10 @@ import training.learn.lesson.general.refactorings.ExtractVariableFromBubbleLesso
|
||||
class PythonLearningCourse : LearningCourseBase(PythonLanguage.INSTANCE.id) {
|
||||
override fun modules() = onboardingTour() + stableModules() + CourseManager.instance.findCommonModules("Git")
|
||||
|
||||
private val disableOnboardingLesson get() = ApplicationNamesInfo.getInstance().fullProductNameWithEdition.equals("PyCharm Edu")
|
||||
private val isOnboardingLessonEnabled: Boolean
|
||||
get() = PlatformUtils.isPyCharmCommunity() || PlatformUtils.isPyCharmPro()
|
||||
|
||||
private fun onboardingTour() = if (!disableOnboardingLesson) listOf(
|
||||
private fun onboardingTour() = if (isOnboardingLessonEnabled) listOf(
|
||||
LearningModule(id = "Python.Onboarding",
|
||||
name = PythonLessonsBundle.message("python.onboarding.module.name"),
|
||||
description = PythonLessonsBundle.message("python.onboarding.module.description", LessonUtil.productName),
|
||||
|
||||
Reference in New Issue
Block a user