Skip to content

Commit

Permalink
EDU-5273: Turn "edu.course.hyperskill.choice.task.support" experiment…
Browse files Browse the repository at this point in the history
…al feature on by default
  • Loading branch information
DonHalkon committed Sep 13, 2022
1 parent 8a2d87f commit 12d2c91
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
6 changes: 3 additions & 3 deletions educational-core/resources/META-INF/Hyperskill.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<experimentalFeature id="edu.course.hyperskill.problems.by.topic" percentOfUsers="100">
<description>Enables grouping JetBrains Academy code challenges by topic</description>
</experimentalFeature>
<experimentalFeature id="edu.course.hyperskill.choice.task.support" percentOfUsers="100">
<description>Enables choice tasks support for JetBrains Academy</description>
</experimentalFeature>
<!-- <experimentalFeature id="edu.course.hyperskill.choice.task.support" percentOfUsers="100">-->
<!-- <description>Enables choice tasks support for JetBrains Academy</description>-->
<!-- </experimentalFeature>-->

<registryKey defaultValue="10" description="Hyperskill metrics sending interval in minutes" key="edu.hyperskill.metrics"
restartRequired="true"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ object EduExperimentalFeatures {
const val PROBLEMS_BY_TOPIC = "edu.course.hyperskill.problems.by.topic"
const val MARKETPLACE_PRIVATE_COURSES = "edu.course.marketplace.show.private"
const val MARKETPLACE_SUBMISSIONS = "edu.course.marketplace.submissions"
const val HYPERSKILL_CHOICE_TASK_SUPPORT = "edu.course.hyperskill.choice.task.support"
// const val HYPERSKILL_CHOICE_TASK_SUPPORT = "edu.course.hyperskill.choice.task.support"
const val SQL_COURSES = "edu.course.sql"
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package com.jetbrains.edu.learning.stepik.hyperskill.courseGeneration

import com.intellij.lang.Language
import com.jetbrains.edu.learning.EduExperimentalFeatures.HYPERSKILL_CHOICE_TASK_SUPPORT
import com.jetbrains.edu.learning.courseFormat.CheckStatus
import com.jetbrains.edu.learning.courseFormat.Course
import com.jetbrains.edu.learning.courseFormat.Lesson
import com.jetbrains.edu.learning.courseFormat.tasks.*
import com.jetbrains.edu.learning.courseFormat.tasks.EduTask.Companion.PYCHARM_TASK_TYPE
import com.jetbrains.edu.learning.courseFormat.tasks.choice.ChoiceTask
import com.jetbrains.edu.learning.courseFormat.tasks.data.DataTask
import com.jetbrains.edu.learning.isFeatureEnabled
import com.jetbrains.edu.learning.messages.EduCoreBundle
import com.jetbrains.edu.learning.stepik.PyCharmStepOptions
import com.jetbrains.edu.learning.stepik.StepikTaskBuilder
Expand Down Expand Up @@ -44,9 +42,6 @@ class HyperskillTaskBuilder(

fun build(): Task? {
val blockName = stepSource.block?.name ?: return null
if (blockName == ChoiceTask.CHOICE_TASK_TYPE && !isFeatureEnabled(HYPERSKILL_CHOICE_TASK_SUPPORT)) {
return null
}

val type = if (blockName == PYCHARM_TASK_TYPE && stepSource.isRemoteTested) {
REMOTE_EDU_TASK_TYPE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.intellij.openapi.application.ApplicationNamesInfo
import com.intellij.openapi.fileTypes.PlainTextLanguage
import com.intellij.testFramework.LightPlatformTestCase
import com.intellij.util.ThrowableRunnable
import com.jetbrains.edu.learning.EduExperimentalFeatures.HYPERSKILL_CHOICE_TASK_SUPPORT
import com.jetbrains.edu.learning.EduExperimentalFeatures.PROBLEMS_BY_TOPIC
import com.jetbrains.edu.learning.configurators.FakeGradleBasedLanguage
import com.jetbrains.edu.learning.courseFormat.tasks.AnswerTask
Expand All @@ -23,9 +22,7 @@ import com.jetbrains.edu.learning.withFeature
class HyperskillProjectOpenTopicProblemsTest : HyperskillProjectOpenerTestBase() {
override fun runTestRunnable(context: ThrowableRunnable<Throwable>) {
withFeature(PROBLEMS_BY_TOPIC, true) {
withFeature(HYPERSKILL_CHOICE_TASK_SUPPORT, true) {
super.runTestRunnable(context)
}
super.runTestRunnable(context)
}
}

Expand Down

0 comments on commit 12d2c91

Please sign in to comment.